This article shows you how to create a symbolic link on Windows.
If you want to easily access folders and files from different folders without maintaining duplicate copies, then it’s a good idea to use Symbolic Links.
Creating a symbolic link
You can create a symbolic link with the mklink command, which stands for… “make link”.
- Open a command box and type
mklinkto see the options:
You have some different options:123/D – creates a soft symbolic link, which is similar to a standard folder or file shortcut in Windows. This is the default option, and mklink will use it if you do not enter a prefix./H – creates a hard link to a file/J – creates a hard link to a directory or folder
In this example we will create a hard link between two folders. Soft-links are very easily created in the Windows Explorer by right-clinking and choosing “Create shortcut”.
- Determine the link location and the target location and issue the command
1mklink /J link target
Example:1mklink /J C:\resolvethis\projects D:\data\projects
This will create a link folder
C:\resolvethis\projectsthat mirrors all content from the real folder
C:\resolvethis\projectsmay not exist yet, else you will get an error.If the link folder or target folder contain spaces in the name, you should enclose them in double quotes.
Synchronizing any folder to dropbox (or OneDrive,…)
If you want, for example, to backup your documents from
to dropbox, you can issue this command:
C:\>mklink C:\Users\resolvethis\dropbox\documents "D:\data\important files"
You should get the “Junction created” message if all went well:
Deleting a Symbolic Link
To delete a symbolic link, just delete the link folder or file just like you would delete a normal folder or file.