Achievable logo
Exam preparation
Lifestyle topics
Achievable blue logo on white background
Achievable blue logo on white background

Using symlinks in Windows Vista

Finally catching up to its Linux competitors, Windows Vista now has the ability to support symbolic links. A symbolic link is a string of text that directs the operating system to another file or directory. These links were first introduced in 1982. Symlinks are easy to create, do not take up much storage space, and …

Achievable blue logo on white background
using-symlinks-in-windows-vista
Achievable blue logo on white background
Achievable blue logo on white background
Achievable SIE - $99
Pass the FINRA SIE on your first try with Achievable's online course. Includes everything you need: easy-to-read online textbook, 2,000+ review quizzes, and 35+ full-length practice exams.
Laptop displaying the Achievable exam prep dashboard and a smartphone displaying a quiz question

Finally catching up to its Linux competitors, Windows Vista now has the ability to support symbolic links. A symbolic link is a string of text that directs the operating system to another file or directory. These links were first introduced in 1982. Symlinks are easy to create, do not take up much storage space, and can even help reduce overall disk space. By replacing duplicative files and folders, symlinks are a vital tool for any tech-savvy individual.


Follow the helpful guide below to discover how to best utilize this shortcut.



storyset / Freepik / “Add files concept illustration” / FreePik license

The first step is initiating the mklink command. After entering this into the command line, there will be several options:


C:\Users\Windows>mklink Creates a symbolic link.


mklink [[/D] | [/H] | [/J]] Link Target


/D Creates a directory symbolic link. Default is a file symbolic link.


/H Creates a hard link instead of a symbolic link.


/J Creates a directory junction.


Link Specifies the new symbolic link name.Target Specifies the path (relative or absolute) that the new link refers to.


For example, to create the folder C:\Users\Windows\MyFolder accessible from C:/MyFolder, construct this command:


C:\mklink /D C:\MyFolder C:\Users\Windows\MyFolderNow, when looking within C:\MyFolder, the items that are available in the other directory will be visible as well.


Other options


mklink


This will create a soft link to a file. Extra options can be added to modify this command.


/D


The /D command creates a symbolic link (which can also be referenced as a soft link). This command can act like a shortcut in previous versions of Windows without using an actual shortcut.


/H


This command will create a hard link that points directly to a file. Make note that this command cannot be used for folders directly.


/J


The /J command will create a discovery junction, which is a hard link to a directory. It’s especially useful if a user is trying to symlink to a directory using a hard link. One limitation of this command is that it can only point to a location on a local system.



A hard link directly points to a file. This type of link also has the capacity to act in an operating system in the same way as the file does. This option is more common when trying to disguise an application’s directory. Creating multiple hard links in a file makes the items in the file accessible from different paths (a location within a directory structure). File systems that incorporate hard links use a process called reference counting, where the system stores an integer value with each data section that represents the number of links that point to the same place. Hard links can only be created for files on the same volume.


A soft link is a shortcut to a file or folder. This will usually redirect to the directory and cannot act like part of the file system. Soft links can still follow a symlinked path, most commonly by directly referencing or opening a file.



syarifahbrit / Freepik / “Men success laptop relieve work from home computer great” / FreePik license

Symlinking can be an incredibly useful tool. However, Windows Vista symlinks cannot be used from another operating system nor from a network share. This can be problematic if you want to use symlinks for a web or file server.


On a final note, if you decide to delete a symlink, only the link should be deleted. Be careful to not delete the original file. When the original source is deleted, the resulting link is often known as a “dead” or “broken” link.


Achievable blue logo on white background
Achievable blue logo on white background
Achievable SIE - $99
Pass the FINRA SIE on your first try with Achievable's online course. Includes everything you need: easy-to-read online textbook, 2,000+ review quizzes, and 35+ full-length practice exams.
Laptop displaying the Achievable exam prep dashboard and a smartphone displaying a quiz question
Achievable blue logo on white background
Achievable logo
Have questions?
Earn 20% as an affiliate
Partner with Achievable to generate new revenue from your website and help people achieve their professional goals
Learn more