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 create hardlinks for a file on an NTFS partition using Windows?

NTFS can obviously handle hardlinks, since creating them with NTFS-3g works – the links even work in Windows. Is this the only way to create hardlinks on NTFS?

share|improve this question

cmd includes the mklink command which can create hardlinks:

Creates a symbolic link.

MKLINK [[/D] | [/H] | [/J]] Link Target

/D Creates a directory symbolic link. Default is a file symbolic link.

/H Creates a hard link instead of a symbolic link.

/J Creates a Directory Junction.

Link specifies the new symbolic link name.

Target specifies the path (relative or absolute) that the new link refers to.

Furthermore, the excellent Far Manager has support for creating them (Alt+F6).

There are also a number of shell extensions that allow for doing so.

share|improve this answer
wow, even softlinks. didn't know they even existed in windows. or is it those .lnk files? good answer, i didn't know that command – knittl May 16 '10 at 16:16
.lnk files are shortcut files -- a shell-level item. Symlinks are an NTFS-level link. – afrazier May 16 '10 at 17:37
i tried this today, cmd.exe does not seem to recognize mklink. OS was windows xp – knittl May 18 '10 at 7:44
@knittl: I was assuming a recent version of Windows. You know, one that still has mainstream support. mklink exists since Windows Vista (mostly because NTFS didn't gain symlink capabilities before that). – Joey May 18 '10 at 13:20
NTFS features changed with every major Windows version so far. Vista brought transactions and symlinks, Windows 2000 added reparse points, quotas, sparse files and more, etc. – Joey May 18 '10 at 21:30

You can use Link Shell Extension to easily do what you want

share|improve this answer
+1: LSE is awesome! – afrazier Apr 10 '11 at 1:39
fsutil hardlink create new_file old_file_name

You will need to run this from an elevated command prompt.

share|improve this answer

You must log in to answer this question.

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