I wanted to create hardlinks to files on Windows Server 2003 and I stumbled upon the superuser question hardlinks on ntfs with windows. I tried mklink as one of the answers suggested and found that mklink isn't a standalone program but rather part of the cmd.exe command shell but was not implemented until later versions of the operating system.

I then tried the fsutil hardlink command and created the hard link as follows:

fsutil hardlink create c:\testfile.txt c:\temp\testfile.txt

which created the hardlink c:\testfile.txt pointing to c:\temp\testfile.txt.

When I edit c:\testfile.txt I notice that the file size and last modified time of c:\temp\testfile.txt would not immediately match; it would take a few minutes until it matched. Why would this be?

Also I noticed that when I do a "dir" or look at the link in Explorer that there is no indication it is a hard link. How do you subsequently know?

Secondarily: Before trying fsutil I tried linkd.exe which is part of the Windows Server 2003 resource kit. It appeared to create the link just fine but I would receive "Access Denied" whenever trying to edit the link. Any ideas why?

1 Answer 1


I can only answer the second of your questions at the moment.

A hard link looks to the OS as though it were the original file. That is intentional, if you delete a hard link for example, it deletes the original file as well. That is by design. So there is no easy way of detecting that it is a link at least visually in Windows Explorer.

UPDATE: Many thanks to @Vedran for correcting me & giving a much better explanation of hardlinks on NTFS. Also for reminding me that I shouldn't assume that what used to be true may not still be true.

"they are all the original. Different filenames pointing to the same bits of data. When there is noone pointing at that data anymore, only then it can be considered as free space."

Under newer versions of Windows at least, hard links are clearly indicated in Windows Explorer as links.

As an aside, the excellent LinkShell Extension is very helpful for creating different type of link and junction from Windows Explorer.

  • You make an interesting point. It just occurred to me that while of course the file system knows that a hardlink exists (fsutil hardlink list will show them), Explorer probably needs a shell extension which would indicate this. I'm still surprised that the existence of the hard link isn't shown by default since even though the link looks like it's the original file, there's still a "connection" between that file and the destination one.
    – Howiecamp
    Commented Mar 4, 2013 at 22:24
  • Hard links are dangerous! Use softlinks if possible as they are more obvious. Of course, they don't work everywhere. For an extension to help with links, try LinkShellExtension. I use it all the time. Commented Mar 4, 2013 at 22:33
  • @Howiecamp every hardlink is the original file, all of them just happen to point to the same blocks of data.
    – Vedran
    Commented Jan 15, 2014 at 14:16
  • Only if you delete all hardlinks the data will be deleted.
    – Vedran
    Commented Jan 15, 2014 at 14:17
  • @Vedran: Really? I rarely use them myself but I seem to remember that last time I tried, deleting one deletes them all. How can you tell which is the original without digging through the technical details of the filing system? I must do some testing - or maybe life is just too short! Commented Jan 17, 2014 at 15:50

You must log in to answer this question.

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