Windows

How to Create Symbolic Links (Symlinks) in Windows 10

0
How to Create Symbolic Links (Symlinks) in Windows 10

Symlinks or Symbolic Links is one of the lesser known, but useful, features in Windows. You can think of symbolic links as shortcuts that you create in Windows. However, symbolic links are much more powerful and useful than ordinary shortcuts. Let’s discuss what symbolic links are and how you can easily create them in Windows 10.

What Are Symbolic Links?

When you create a shortcut for a file or folder, all you do is point it to that specific file or folder, nothing more. Symbolic links are more than just simple shortcuts. They act as virtual files or folders linked to actual files or folders.

When you symlink a file, it looks as if it’s the actual file when in fact it points you to the actual file in the background. Apart from files, you can also create symlinks for folders. To put it simply, a symlink is nothing more than constructing a string of text that lets the operating system know it’s just a path for another file or folder.

For example, most cloud service applications that you install will only sync files and folders located in their own folder. But there will be times when you might have a folder on some other drive that you want to sync with a cloud storage service.

However, you don’t want to move the folder from its actual location or you don’t want to make a copy of the folder. In those situations, you can simply create a symlink in the cloud service folder so you can sync the contents of the target folder without actually moving or copying the actual folder.

Since symlinks are just virtual folders that only act as paths to actual folders, you don’t have to worry about symlinks taking up your disk space.

Create Symbolic Links Using Shell Link Extensions

1(1)

If you don’t want to mess around with the Command Prompt and are ready to play around a bit with installing a tool that lets you link to existing files or directories using the right-click context menu, try the following. Link Shell Extension is a tool that allows you to create hard links and symbolic links by right-clicking any folder you want to create links for.

There are several obstacles in the installation. You’ll get a warning that it can’t be downloaded safely, and Windows Defender might warn you that it’s “unsigned.”

We can assure you that it is safe. Go ahead and install it. During the installation explorer.exe will restart, so make sure you have a backup of what’s important.

Once LSE is installed, right-click the target file or folder you want to symlink with, then click “Select Link Source.”

2(1)

Next, open the folder where you want the symlinks to appear, right-click and select “Drop As -> Symbolic Link.”

3(1)

Create Symbolic Links Using Mklink

Note: although I’m showing this on Windows 10, the commands shown here apply to Windows Vista and later.

Creating a symlink in Windows is quite easy with the mklink command. To get started, press Win + X, then select the “Command Prompt (Admin)” option to open a Command Prompt with admin rights.

4(1)

Once the command prompt has opened, use the command format below to create a symlink for a file.

mklink Link Target

In my case, I want to create a symlink on drive E for a text file located on drive F, so the command looks like this:

mklink "E:PathSymlink_File.txt" "F:Real_File.txt"

5(1)

The first path you see in the above command is where you create the symlink. This path is called a “Link”. The second path belongs to the actual file on your disk and is called “Target.”

After the symlink is created, this is what it looks like in File Explorer. Even though the icon looks like a regular shortcut, it’s a symbolic link.

6(1)

Together with individual files, you can symlink entire directories. To do that, use the command below. The / D switch allows you to do this.

mklink /D "E:PathSymlink_Books" "F:Books"

7(1)

As soon as you run the command, a symlink will be created for the target directory. You can use it to access all files and folders inside the original folder. If you want you can remove symbolic links such as other files or folders. Just select the symlink, hit the delete key on your keyboard, and you’re good to go.

8(1)And you’re done! If you want to do more tweaking under the hood in Windows 10, check out our list of the best registry hacks. Also, check out our guide on how to get Mac-style hot corners in Windows 10.

How to Format Table Borders in Microsoft Word

Previous article

You may also like

More in Windows