The Big Picture: More Than One Way to Reach a File

Usually one file has one name. But sometimes you want the same file to appear in two places: a shared library in two program folders, or a short path that leads into a deep folder. A link gives you another way in, without copying the data.

Think of a building with a main door and a side door (both lead into the same room), or a sign saying "go to Room 12" (it points elsewhere). NTFS supports three kinds of link, plus the humble shortcut, which is something different.

KindAnalogyMade with
Hard linkA second door into the same roommklink /H
Symbolic linkA signpost pointing to another pathmklink (add /D for folders)
JunctionA signpost for folders, on this PC onlymklink /J
Shortcut (.lnk)A note on the desk saying "see that file"Right-click → New → Shortcut

What it is: A hard link is an additional name for an existing file. There is one file (one MFT record, Section 4.1) and two directory entries pointing at it. Neither name is the "original". They are equals.

 Folder A                     Folder B
 ┌───────────────┐            ┌───────────────┐
 │ report.txt ───┼──┐      ┌──┼─── copy.txt   │
 └───────────────┘  │      │  └───────────────┘
                    ▼      ▼
              ┌───────────────────────┐
              │ ONE MFT record        │
              │ link count = 2        │
              │ data: "Quarterly..."  │
              └───────────────────────┘

How it works: The record keeps a link count, the number of names pointing to it. A file with two names has two $FILE_NAME attributes. Deleting one name lowers the count to 1; the data stays. Only when the count reaches 0 is the file really freed.

Behavior:

  • Change the file through one name and the other name shows the change, because it is the same data.
  • It uses almost no extra space (just one more list entry).
  • Hard links work only on the same volume, and only for files, not folders.

Create one:

mklink /H copy.txt report.txt

Note the order: new link name first, existing file second. Windows itself uses hard links, for example in the WinSxS component store, to share files between several places.

What it is: A symbolic link (symlink) is a tiny special file that stores a path. When a program opens the symlink, Windows quietly redirects it to the path stored inside.

 C:\Tools\latest.exe  ──(stores the text)──►  "D:\Apps\Tool\v7\tool.exe"
        │ opens
        ▼
 Windows follows the stored path and opens D:\Apps\Tool\v7\tool.exe

How it works: The symlink is a reparse point (a file marked "do not use as-is; a driver must interpret it"). NTFS sees the mark and follows the target.

Behavior:

PropertySymlink
Works forFiles and folders
Across volumes (C: to D:)Yes
Across the networkYes (can point to a network path)
If the target is deletedThe link is left broken (it points at nothing)
Different from a hard linkIt is a separate file with its own record; it only holds a path

Create one:

mklink linkname targetfile
mklink /D linkname targetfolder

/D means "this link is for a directory". Note: Creating symlinks normally needs an administrator Command Prompt, unless Developer Mode is switched on in Windows Settings. If you see "You do not have sufficient privilege", that is why.

In dir listings a symlink appears as <SYMLINK> for a file link and <SYMLINKD> for a folder link.

6.3 Junction Points

What it is: A junction is an older, simpler kind of folder link. It points to another folder on a local drive and works like a symlink for directories, but with a few limits.

JunctionDirectory symlink
Points toA folder on a local volumeA folder, locally or across the network
Path styleAlways the full (absolute) pathFull or relative path
Needs admin / Developer ModeNoUsually yes
Works on filesNo(file symlinks are a separate type)

Create one:

mklink /J C:\Short C:\Very\Long\Deep\Folder

Windows uses junctions itself. For old programs, C:\Documents and Settings is a junction to C:\Users, and C:\Users\All Users leads to C:\ProgramData. (These are protected; leave them alone.) In dir listings they show as <JUNCTION>.

Careful when deleting. Delete a junction or a folder symlink with rmdir linkname (no /s). That removes only the link. Some tools that "delete recursively" can follow the link and delete files in the target folder, which would be a nasty surprise.

6.4 Shortcuts (.lnk): A Different Thing

A shortcut (Cat.lnk) is not an NTFS feature at all. It is an ordinary file whose contents describe a target (and an icon, a start folder, a hotkey). Only Explorer and a few programs understand it. A command-line tool or a program opening Cat.lnk just sees a small file.

Shortcut .lnkSymlink / Junction / Hard link
Understood byExplorer (the shell) onlyThe file system, so every program
Works on FAT32 and exFATYes (it is just a file)No (NTFS feature)
Can hold extra optionsYes (icon, hotkey, run minimized)No

6.5 Which One Should I Use?

Want the same FILE under two names on one drive? ───────► hard link
Want a link to a file or folder on ANOTHER drive? ──────► symbolic link
Want a folder link, simple, local only, no admin? ──────► junction
Want a desktop icon that opens something? ──────────────► shortcut

Windows tip: To see what is a link in a folder, run dir and look for <SYMLINK>, <SYMLINKD> and <JUNCTION>. In PowerShell, Get-ChildItem | Select-Object Name, LinkType, Target shows the type and where it points.

Summary

TermPlain meaning
Hard linkAnother name for the same file (same MFT record); same volume, files only
Link countHow many names a file has; data freed when it reaches 0
Symbolic linkA small file that stores a path and redirects to it; works across volumes
Reparse pointA marked file that tells NTFS "a driver must interpret me"
JunctionFolder link to a local folder, no admin needed
Shortcut (.lnk)An ordinary file only Explorer treats as a pointer
mklink, /H, /D, /JThe command that makes links (hard, directory symlink, junction)