NTFS links on Windows: symbolic links, junctions, and hard links compared

Windows supports three distinct types of filesystem links: symbolic links, directory junctions, and hard links. They look similar from the outside but behave differently in ways that matter — across drives, across reboots, under backup software, and under deletion. This reference article explains each type, when to use it, and what to expect from each one in a real environment.


Quick reference

FeatureSymbolic link (/D)Junction (/J)Hard link (/H)
Target typeFile or folderFolder onlyFile only
Cross-drive
Network paths✓ (with GPO)
Admin required to create
Legacy app compatibilityPartialHighHigh
Visible in ExplorerShortcut iconShortcut iconNormal file
Target deleted → link breaks— (data survives)
CMD create commandmklink /Dmklink /Jmklink /H
PowerShell create commandNew-Item -ItemType SymbolicLinkNew-Item -ItemType JunctionNew-Item -ItemType HardLink

How each link type works

Symbolic link

A symbolic link is a filesystem pointer stored as a reparse point on the NTFS volume. When an application opens the link path, the OS resolves the pointer at access time and transparently redirects the operation to the target. The target can be a file or folder on any drive, or a network path (with Group Policy enabled).

Symbolic links are the most flexible type. They work across drives and volumes, support both files and directories, and are transparent to almost all modern applications. The trade-off is that they require administrator privileges to create and, in some legacy environments, may not be followed correctly by older installers.

:: Create a directory symbolic link
mklink /D "C:\LinkedFolder" "D:\RealFolder"

:: Create a file symbolic link
mklink "C:\Linked\config.ini" "D:\Configs\app.ini"

Junction

A junction is a folder-only link that also uses NTFS reparse points but with a different internal mechanism. Junctions were introduced before symbolic links and are supported on all Windows versions from 2000 onward. They are more compatible with legacy software, system-managed folders, and older installers that may not correctly follow symbolic links.

Junctions work across drives on the local machine but cannot point to network paths. For most AppData redirection and legacy app compatibility scenarios, a junction is the safer choice.

:: Create a directory junction
mklink /J "C:\OldApp\Data" "D:\AppStorage\Data"
Note: Junctions store the target as an absolute path. If you move or rename the target folder, the junction breaks — exactly like a symbolic link.

Hard link

A hard link is fundamentally different from the other two types. It does not create a pointer to another location — it creates a second directory entry for the same file data on disk. Both paths are equal: there is no “original” and no “copy”. The underlying file data is reference-counted by the NTFS filesystem and only deleted when all hard links pointing to it are removed.

Hard links are restricted to files and must remain on the same NTFS volume. They are invisible to most applications — Explorer, dir, and most tools show them as regular files.

:: Create a hard link — both paths point to the same file data
mklink /H "C:\App2\Logs\current.log" "C:\App1\Logs\output.log"
Warning: Because hard links share the same file data, editing the file through either path modifies the same content. This is expected behavior, but can cause confusion if not documented in scripts that use both paths.

When to use which

ScenarioBest choiceWhy
Sync an app folder to OneDrive or DropboxSymbolic link /DWorks across drives, transparent to the app
Redirect AppData to a secondary driveJunction /JBetter compatibility with system-managed paths
Legacy app with hardcoded pathJunction /JOlder installers may not follow symlinks
Same file needed in two script locationsHard link /HNo pointer — both paths are the file
Link to a network shareSymbolic link /DOnly type that supports UNC paths (GPO required)
Dev environment: shared test dataSymbolic link /DCross-drive, easy to rebuild, transparent
Reduce duplication of identical files on same driveHard link /HSingle copy on disk, multiple access paths

Behavioral differences worth knowing

Deletion behavior differs by type

For symbolic links and junctions: deleting the link with rd removes only the link entry. The target is untouched. Deleting the target leaves the link broken. For hard links: deleting one path removes that entry, but the file data persists until all hard links to it are removed.

Common mistake: Using rd /S on a symbolic link or junction deletes the target directory contents, not just the link. Always use rd without /S to remove a link safely.

Backup software may not handle links correctly

Some backup tools follow symbolic links and junctions during backup, duplicating the target data at the link location. Others skip links entirely. Hard links may be backed up multiple times as separate files. Always verify how your backup solution handles each link type before deploying links in backed-up paths.

Hard links are invisible to most inspection tools

File Explorer, dir, and most utilities show hard links as normal files with no indicator that a second path exists. To inspect hard links, use fsutil hardlink list "C:\path\to\file". For symbolic links and junctions, use dir /AL.

:: Inspect symbolic links and junctions in current directory
dir /AL

:: List all hard link paths for a specific file
fsutil hardlink list "C:\App1\Logs\output.log"

Official reference

mklink — Windows Commands | Microsoft Learn


Related guides