Purpose:Create NTFS symbolic, hard, and soft links

 

Format:MKLINK [/A:[[-]rhsadecijopt /A /D /H /J /Q /X] Link Target

 

LinkThe new symbolic link name
TargetThe pathname (full or relative) that the new link refers to

 

/ACreate a link with an absolute path.
/DCreate a directory symbolic link. (The default is to create a file symbolic link.)
/HCreate a hard link (like MKLNK).
/JCreate a junction.
/Q Don't display results.
/X Delete directory link.

 

File Selection

 

Supports command dialog, attribute switches, extended wildcards, ranges, and include lists. Date, time, size, or file exclusion ranges anywhere on the line apply to all source files. Use wildcards with caution on LFN volumes; see LFN File Searches for details.

 

Usage:

 

Due to Windows file system restrictions, creating symbolic links with MKLINK requires an NTFS volume.

 

The file/directory names in Link and Target can be fully or partially qualified. MKLINK will also copy an existing description to the link. If you don't specify any arguments, MKLINK will display its command dialog.

 

MKLINK sets two internal variables:

 

%_mklink_filesThe number of links created
%_mklink_errorsThe number of errors

 

See also MKLNK.

 

Option:

 

/=Display the MKLINK command dialog to help you set the filename and command line options. You cannot specify any other arguments on the command line.

 

/ACreate a link with an absolute (full expanded) pathname. For CMD compatibility, MKLINK creates relative links if you don't specify a full pathname.

 

/DCreate a directory symbolic link. (The default is to create a file symbolic link.)

 

/HCreate a hard link instead of a symbolic link.

 

/JCreate a junction rather than a symbolic link.

 

/QDon't display the result.

 

/XDelete a directory link.