Mklink Command Official
The mklink command is a powerful, built-in utility in Windows (Vista and later) that allows users to create symbolic links (symlinks), hard links, and directory junctions from the command line.
A Junction is a specific type of link for directories. It acts very similarly to a Directory Symbolic Link but is older technology (supported since Windows 2000). mklink command
del link.txt # for file links rmdir MyDocs # for directory symlinks/junctions The mklink command is a powerful, built-in utility
: Created with the /J switch, a junction is a "hard" link for directories. Unlike symbolic links, junctions are resolved locally by the server and are commonly used to map folders across different partitions on the same machine. del link
If you have a web server like XAMPP installed on C: but want to store your website files on D: , you can move the folder and create a link so the server doesn't know the location changed: Move C:\xampp\htdocs to D:\htdocs . Run: mklink /D "C:\xampp\htdocs" "D:\htdocs" .
This creates a junction point named myjunction that points to C:\path\to\targetdir .
# File symlink mklink link.txt C:\Users\Actual\file.txt