__link__: Windows Hard Link
| Feature | Hard Link | Symbolic Link | |---------|-----------|----------------| | Points to | File data (inode) | Pathname (string) | | Survives target deletion | Yes (data still exists) | No (becomes broken) | | Works across volumes | No | Yes | | Works with directories | No (by design) | Yes (with privilege) | | Relative paths | N/A | Yes | | Network paths | No | Yes (UNC paths) |
In this guide, you'll learn exactly what hard links are, how to create them, when to use them, and the critical pitfalls to avoid. A hard link is an additional directory entry that points directly to the same underlying file data on disk.
mklink /H "ProjectA\windows.iso" "MasterISOs\windows.iso" mklink /H "ProjectB\windows.iso" "MasterISOs\windows.iso" mklink /H "ProjectC\windows.iso" "MasterISOs\windows.iso" Total disk usage: size of one ISO. Want to keep a "snapshot" of a file before making changes, but don't want to double disk space? windows hard link
A copy is two independent files. Change one, the other stays old. A hard link is one file with two names. This is where most people get tripped up.
echo Important > doc.txt mklink /H backup.txt doc.txt del doc.txt Many users think backup.txt now contains the original data. It does! But they also think doc.txt is gone forever. That's correct. What they realize: backup.txt is the original data now. Deleting doc.txt only removed one name. | Feature | Hard Link | Symbolic Link
fsutil hardlink list "file.txt" Or with PowerShell:
A hard link doesn't point to a path —it points directly to the raw data on disk. That data has no location except "wherever Windows put it." Junction points are volume-mounted directory links (only for folders, only local drives). They behave like symlinks for folders but have fewer features. Hard links don't work on folders at all in Windows (NTFS supports them, but Windows restricts creation for safety). Creating Hard Links on Windows Windows provides two built-in ways: mklink (Command Prompt) and New-Item (PowerShell). Using Command Prompt (Run as Administrator for some operations, but not strictly required for files) mklink /H LinkName TargetFile Example: Want to keep a "snapshot" of a file
echo Hello > original.txt mklink /H link.txt original.txt type link.txt # Output: Hello echo World >> original.txt type link.txt # Output: Hello World /H is the crucial flag—without it, mklink creates a symbolic link by default. New-Item -ItemType HardLink -Path "C:\links\link.txt" -Target "C:\data\original.txt" Or with the shorter alias: