mklink
command.The
mklink
command is used to create a symbolic link. It has the following command line syntax:mklink [[/D] | [/H] | [/J]] link target
/D
– Creates a directory symbolic link. Can also point to a remote SMB network path.
/H
– Creates a hard link instead of a symbolic link./J
– Creates a Directory Junction. Can only point to directories on the same volume.
- If no arugement is specified, mklink creates a file symbolic link.
link
– Specifies the new symbolic link name.target
– Specifies the path (relative or absolute) that the new link refers to.
del
and rmdir
can be used to delete the symbolic links to files and directories respectively.To delete symbolic link to a file, the following command line syntax can be used:
del filename
filename
– Specifies the name of the file/symbolic link to be deleted
rmdir directoryname
directoryname
– Specifies the name of the folder/symbolic link to be deleted
For those who are interested here's a list of related articles with some more background information about the NTFS file system, Symbolic Links and Junction Points:
- Junction Points and Symbolic Links [tuxera.com]
- Windows Symbolic and Hard Links [shell-shocked.org]
- NTFS Junction Points [Wikipedia]
- NTFS Symbolic Links [Wikipedia]
- Windows File Junctions, Symbolic Links and Hard Links [ipggi.wordpress.com]
- Create Symbolic Links, Hard Links and Directory Junctions in Vista with MKLINK [mydigitallife.info]
Probably worths mentioning the subst command to have a new hard drive entry for a deep folder.
ReplyDelete