This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
Creates a directory or file symbolic or hard link.
Syntax
mklink [[/d] | [/h] | [/j]] <link> <target>
Parameters
Parameter
Description
Creates a directory symbolic link. By default, this command creates a file symbolic link.
Creates a hard link instead of a symbolic link.
Creates a Directory Junction.
Specifies the name of the symbolic link being created.
<target>
Specifies the path (relative or absolute) that the new symbolic link refers to.
Displays help at the command prompt.
Examples
To create and remove a symbolic link named MyFolder from the root directory to the \Users\User1\Documents directory, and a hard link named Myfile.file to the example.file file located within the directory, type:
mklink /d \MyFolder \Users\User1\Documents
mklink /h \MyFile.file \User1\Documents\example.file
rd \MyFolder
del \MyFile.file
Command-Line Syntax Key
del command
rd command
New-Item in Windows PowerShell