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

How can I make hard links for directories in Windows 7? That means that the 2 (or more?) linked directories refer to the same inode (group of inodes) so they will be exact duplicated and every change to the one will also affect the other. If I add a file (or change a file) in the one file that file will also be added/changed at the other directory because it's internally the same directory.

How can I do this?

share|improve this question
Try Use mklink /d /h linkname target – soandos Feb 13 '12 at 18:41

You cannot create a hardlink to a directory. See the 'following are not' examples on this article about Hard Links and Junctions. Mklink calls the CreateHardLink function and if you look at the description you see this summary.

Establishes a hard link between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.

You can create a junction (symlink), but hardlinks to directories are simply not valid on most systems..

share|improve this answer
up vote 1 down vote accepted

I found an interesting tool named Link Shell Extension doing exactly this.

share|improve this answer
While I agree that may be a useful tool, it cannot make a hardlink to to a directory, if it is working on directories, then it is creating junction points. – Zoredache Feb 13 '12 at 19:13
@Zoredache Yep, exactly. It's using junctions. – Michael Feb 13 '12 at 19:15

You must log in to answer this question.

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