Forrest logo
back to the mklink tool

mklink:tldr:27972

mklink: Create a symbolic link to a directory.
$ mklink /d ${path\to\link_file} ${path\to\source_directory}
try on your machine

The command "mklink /d ${path\to\link_file} ${path\to\source_directory}" creates a symbolic link to a directory in Windows.

Here is a breakdown of the command:

  • "mklink" is the command used to create symbolic links in Windows.
  • "/d" is an option used to specify that the link being created is a symbolic link to a directory. This option is necessary when creating a directory symbolic link.
  • "${path\to\link_file}" is the path where you want to create the symbolic link. Replace "${path\to\link_file}" with the actual path to the location where you want the symbolic link to be created. This includes the name of the symbolic link.
  • "${path\to\source_directory}" is the path to the directory that you want to create a symbolic link to. Replace "${path\to\source_directory}" with the actual path to the directory you want to link to.

When you execute this command, it will create a symbolic link to the specified directory at the location you specified. This allows you to access the files and folders within the source directory from the location of the symbolic link.

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