Home

mklink

mklink is a command-line utility in Windows that creates reparse points in NTFS volumes, enabling symbolic links, hard links, and directory junctions. It is invoked from the Command Prompt and supports several link types to redirect a link name to a specified target.

Syntax and types:

- mklink Link Target creates a symbolic link to a file named Link that points to Target. This

- mklink /D Link Target creates a directory symbolic link.

- mklink /H Link Target creates a hard link to a file. Hard links must refer to a

- mklink /J Link Target creates a directory junction, a type of reparse point that links to an

Notes:

- Symbolic links can point to files or directories across volumes and can reference UNC paths; hard

- Link creation generally requires appropriate privileges: on some Windows versions, administrative rights are needed, while enabling

- Deleting the link does not delete the target; only the link itself is removed.

- The Link name must not already exist. The Target may or may not exist depending on the

Usage examples:

- mklink MyLink.txt Target.txt

- mklink /D MyFolder TargetFolder

- mklink /H MyFileLink.txt Target.txt

- mklink /J MyFolderLink TargetFolder

mklink is commonly used to create convenient aliases for files and directories, redirect software paths, or

is
the
default
behavior
for
file
links.
file
on
the
same
volume
as
the
link.
existing
directory.
links
and
directory
junctions
are
restricted
to
the
local
volume
and
are
typically
used
for
directories.
Developer
Mode
can
allow
non-administrative
users
to
create
symbolic
links.
link
type
(symbolic
links
can
point
to
non-existent
targets,
while
hard
links
require
an
existing
target).
preserve
compatibility
when
moving
or
reorganizing
data
without
duplicating
content.