This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Creates a directory or file symbolic or hard link.
mklink [[/d] | [/h] | [/j]] <link> <target>| Parameter | Description |
|---|---|
| /d | Creates a directory symbolic link. By default, this command 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 being created. |
<target> | Specifies the path (relative or absolute) that the new symbolic link refers to. |
| /? | Displays help at the command prompt. |
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\Documentsmklink /h \MyFile.file \User1\Documents\example.filerd \MyFolderdel \MyFile.fileWas this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?