HomeWindowsXP: Create a Hard Link Reference to a File with fsutil

XP: Create a Hard Link Reference to a File with fsutil

UNIX users have long used symbolic or hard links to create a new reference to an existing file. Windows XP has a new function called fsutil which, among other interesting filesystem utilities, allows the creation of hard links on an NTFS volume. The referenced file behaves exactly like the original file.


To create a hard link of the file OLD.TXT in the current working directory to a new file called \TEMP\NEW.TXT, use the following command:

fsutil hardlink create \TEMP\NEW.TXT OLD.TXT

Note: the syntax is opposite that of the UNIX ln command.

Both OLD.TXT and NEW.TXT are references to the actual file on disk. Deleting the hard link (NEW.TXT) will only delete the link, not the original file. Deleting the original file (OLD.TXT) also will not delete the actual file as long as another hard link to the file exists.

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!