Skip to main content

Create symbolic (symlink) and hard links in Windows.

:: To create a symbolic link to a file:
mklink <path/to/link> <path/to/source_file>

:: To create a symbolic link to a directory:
mklink /d <path/to/link> <path/to/source_directory>

:: To create a hard link to a file:
mklink /h <path/to/link> <path/to/source_file>

:: To create a directory junction:
mklink /j <path/to/link> <path/to/source_file>