Windows Hard Link May 2026

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:

mklink /H "C:\LegacyApp\config.ini" "D:\SharedConfig\config.ini" Now the legacy app and your modern tool share the same config. When using WSL, files stored in \\wsl$\ are actually on a virtual filesystem. Hard links don't work across the Linux/Windows boundary, but within a Windows NTFS drive, hard links are fully supported. Useful for deduplicating build artifacts between WSL and native Windows tools. Critical Limitations and Dangers ❌ No Directories Windows explicitly blocks creating hard links to directories (NTFS supports them, but Windows disables it to prevent infinite recursion and other filesystem nightmares). windows hard link

copy file.txt file_backup.txt # Wrong: uses 2x space mklink /H file_backup.txt file.txt # Right: zero extra space This is not a true snapshot. Changes to file.txt will appear in file_backup.txt because they're the same data. Use this only when you want simultaneous updates across paths, not historical versions. 3. Compatibility Layers for Legacy Software Some old software expects configuration files in hardcoded paths. Instead of copying (and then desyncing), use hard links: echo Hello > original

fsutil hardlink list "file.txt" Or with PowerShell: Hard links don't work across the Linux/Windows boundary,

(Get-Item "link.txt").LinkType # Output: HardLink In File Explorer, hard links appear as normal files—there's no special icon or overlay. This is both a feature (no clutter) and a danger (easy to forget they're linked). 1. Deduplication Without Deduplication Features You have the same large ISO file needed in three different project folders. Instead of using 6 GB, create hard links:

Workaround: Use directory junctions or symlinks with mklink /D or mklink /J . Hard links cannot span drives (C:\ to D:). Each volume maintains its own file reference table. For cross-volume needs, use symbolic links. ❌ The Deletion Trap This is the most common hard link mistake: