Software >> OS >> Windows >> mklink >> How to use mklink to create symbolic links like ln in unix

 

create a soft symbolic link for a directory

mklink /d \MyFolder \Users\User1\Documents

create a hard symbolic link for a file   

mklink /h \MyFile.file \User1\Documents\example.file


SYNTAX

mklink [[/d] | [/h] | [/j]] <Link> <Target>


PARAMETERS

Parameter   Description
/d          Creates a directory symbolic link. By default, mklink creates a file symbolic link.
/h          Creates a hard link instead of a symbolic link.
/j          Creates a Directory Junction.
<Link>      Specifies the name of the symbolic link that is being created.
<Target>    Specifies the path (relative or absolute) that the new symbolic link refers to.
/?          Displays help at the command prompt.