Create Symbolic Links with mklink
CMD built-in for symbolic (/D), hard (/H) and junction (/J) links between paths.
01Command
$ mklink /D "C:\Users\me\Link" "D:\RealFolder"02What it does
mklink only exists in CMD, not PowerShell, and its argument order is the opposite of ln -s: new link first, existing target second. /D makes a directory symbolic link, /H a hard link to a file, and /J a junction which needs no admin rights and works across local volumes. Symbolic links (/D) require an elevated prompt or Windows Developer Mode. To undo a directory link use rmdir on the link path only — it removes the link, never the target contents.
03Risk
04Undo
$ Remove the link file itself (e.g. `rmdir "C:\Users\me\Link"` for a directory link) — this deletes only the link, not the target contents.05Sources
- MKLINK - Create a symbolic linkEvidence: Documents mklink's /D, /H and /J switches, the elevated-prompt requirement for symbolic links, and rmdir for removing directory links safely.
Last verified: 2026-09-17 · Category: Files & Folders
06Related solutions
One command that shows OS version, install date, boot time, memory, network adapters and installed hotfixes.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.
Remove hidden, system and read-only flags from files or whole directory trees.