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.

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
1  
Try Use mklink /d /h linkname target –  soandos Feb 13 '12 at 18:41
add comment

2 Answers

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
add comment
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
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.