2

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.

3
  • 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. Feb 6, 2012 at 15:35
  • 3
    possible duplicate of UnionFS-like filesystem for windows Feb 9, 2012 at 1:49
  • Can someone please close this as an exact duplicate for me? Mar 5, 2012 at 6:55

1 Answer 1

0

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.

2
  • 1
    It seems to me that the poster is looking for overlayfs/unionfs kind of mounts, not just simple links. Feb 6, 2012 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. Feb 6, 2012 at 7:34

You must log in to answer this question.

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