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?

  • 1
    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..


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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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