Forrest logo
back to the mklink tool

mklink:tldr:68443

mklink: Create a directory junction.
$ mklink /j ${path\to\link_file} ${path\to\source_file}
try on your machine

The command "mklink /j ${path\to\link_file} ${path\to\source_file}" is used in Windows to create a directory junction (symbolic link) between two directories. Let's break down the command:

  • "mklink" is the command itself, used to create symbolic links or directory junctions.
  • "/j" is an option that specifies the type of link to create, in this case, a directory junction.
  • "${path\to\link_file}" is the path to the directory where you want to create the link file. You need to replace "${path\to\link_file}" with the actual path to the directory you want to create the link in.
  • "${path\to\source_file}" is the path to the original or source directory that you want to link to. Similarly, you need to replace "${path\to\source_file}" with the actual path to the directory you want to link to.

When the command is executed, it creates a directory junction at the specified location (${path\to\link_file}) that points to the source directory (${path\to\source_file}). This means that any changes made in the source directory will also be reflected in the linked directory, and vice versa. It allows you to access the content of the source directory through the link file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mklink tool