Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

For example I have a directory like this:


It has a file in it called zoo.txt

I have another directory like this:


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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .