Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible on Windows NT to have one directory sort of on top of another?

For example I have a directory like this:

C:\foo

It has a file in it called zoo.txt

I have another directory like this:

C:\bar\baz

It has the file museum.txt in it.

I would like to be able to talk about C:\foo\museum.txt and automatically get C:\bar\baz\museum.txt.

Additionally, if a file named C:\bar\baz\zoo.txt is ever created, I would like that file when referencing C:\foo\zoo.txt

Lastly, if I create a file named C:\foo\qux.txt I would like that file to actually appear in C:\bar\baz\qux.txt and if I ever cancel the overlay mount or whatever mechanism I'm using to make this happen, it will disappear from C:\foo\qux.txt

Are these things possible?

Basically, I have a vendor supplied directory that needs to have some source code overlaid on top of it and compiled. But I would like the actual vendor supplied directory to remain in the state it was when it was shipped from the vendor.

Right now a backup is kept of this directory, and it is restored from backup before the source code is built, then the current version of the source code is copied onto it. This is very inefficient and error prone.

share|improve this question
    
This seems to have been worded in such a way that people think I mean symbolic links, but that's not what I'm talking about. –  Omnifarious Feb 6 '12 at 15:35
    
possible duplicate of UnionFS-like filesystem for windows –  Omnifarious Feb 9 '12 at 1:49
    
Can someone please close this as an exact duplicate for me? –  Omnifarious Mar 5 '12 at 6:55
add comment

1 Answer

You are asking about symbolic-links/hard-links/junction-points.

What you can do is to create one of the aforementioned links/points called baz in C:\bar, and have it point to C:\foo as the target. Now you can access and treat C:\bar\baz like an ordinary directory and whatever (for the most part) you do to it will actually occur in C:\foo.

share|improve this answer
    
It seems to me that the poster is looking for overlayfs/unionfs kind of mounts, not just simple links. –  grawity Feb 6 '12 at 6:57
    
@grawity: That's what I was thinking too. :-) But it's nice to know that junction points exist. They could be useful for other things. –  Omnifarious Feb 6 '12 at 7:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.