Using Symbolic and Hard Links in Windows

Below we will analyze the notion of hard and symbolic links in Windows, tell you about their primary purpose and key differences. You can also learn how to create links using standard Windows methods or special software quickly.

Using Symbolic and Hard Links in Windows

Contents

  1. Symbolic links
  2. Hard links
  3. How can I use symbolic links?
  4. How can I simplify the creation of the symbolic and hard link?

Symbolic links

Symbolic links (also known as “Soft Links” or “SymLink”) are particular objects in which, instead of information and data, there is a path to a specific file or directory on your computer’s hard drive

Such functionality has some similarities to shortcuts, but in contrast, it creates a hard link to a specific place. The usage of these links saves the hard drive space and gets a kind of access point to information between different file systems without filling the drive with unnecessary data copies.

The key point in using symbolic links is to keep programs and their individual objects, to which symbolic links have been created, functional. Also, conventional shortcuts are links that can be used to navigate to the original folders.

If a user navigates to the original folder by shortcut, all actions with files (deleting, changing the name, etc.) will directly impact the original. If symbolic links are used, the user will be able to create a symbolic image of the directory (folder), which will contain symbolic links to the original files.

It should be noted that such data are lightweight. Their size is approximately comparable to shortcuts, although due to the peculiarities of work (symbolic links literally “cheat” programs and the operating system, giving out under the guise of a symbolic link is a real existing object), the weight of the folder will always be shown equal to the weight of the original.

Hard links

The Hard Link has similar functionality with symbolic links, but its key differences are:

  • The ability to work in only one particular file system.
  • The ability to work within only one logical partition.
  • The system perceives hard link as well as the symbolic link as the original file, but hard link keeps its originality (all hard link files are originals), while when you change the current file or directory of symbolic link, such links will lose their relevance, because they have nowhere to link.

Thus, hard links have a much smaller range of applications but provide security when used, as all hard links are independent of their original.

How can I use symbolic links?

Symbolic links can have an excellent potential for use. For example, such links can be used when working with virtual machines or for more convenient work with cloud storage. Symbolic links do not waste hard drive resources by moving large folders and files but simply creating symbolic links with the same characteristics, full functionality, and other data capabilities as the symbolic link was created.

In this way, you can move and synchronize large folders under the guise of symbolic links to the repository or move programs from the main computer to the virtual machine without installation, waste of space, and with the preservation of utility functionality. It allows you to edit, work or change the virtual machine’s data structure, synchronized with the data on the real PC, without opening access from the virtual machine to the real computer.

For example, let’s try to create a symbolic link to the data recovery program RS Partition Recovery to save space, move it to another disk, and at the same time do not reinstall the utility to the root of the folder on the new system disk.

Important: Features of symbolic links are available from Windows Vista. Older versions of the operating system do not support working with them because their functionality includes the ability to create only hard and soft (shortcuts) links.

The process of creating a symbolic link looks like this:

Step 1: Work with symbolic links is done through the standard Windows utility “Command Prompt”. Press the Win+R key combination and enter the “cmd” command in the window that opens.

Using Symbolic and Hard Links in Windows

Step 2: In the window that opens, enter the command “mklink”, which will help you to get the description of the functionality and possible actions with symbolic links.

Using Symbolic and Hard Links in Windows

Step 3. After reading the keys, let’s try to create a symbolic link to the “C:\Program Files\Recovery Software\RS Partition Recovery” directory. To do this, we need to enter the following command

mklink /j "D:recoverymk" "C:\Program Files\Recovery Software\RS Partition Recovery"

Let’s analyze each item of the command in more detail.

  • Mklink – is the main command associated with the creation of symbolic links. It is written in the beginning.
  • /j is a key to create a symbolic link for a directory. The /d key must be used to create the file. The /h key is used to create a hard link.
  • “D:recoverymk” key is a path where a symbolic link to a directory will be saved.
  • “C:\Program Files\Recovery Software\RS Partition Recovery” is the source from which the symbolic link was created.

In our case, a successful symbolic link creation looks like this:

Using Symbolic and Hard Links in Windows

Check the created link and its work in the place that was specified when creating it. In our case, it is “D:recoverymk”

Using Symbolic and Hard Links in Windows

Try to launch the utility via a symbolic link.

Using Symbolic and Hard Links in Windows

RS Partition Recovery program (as well as any other programs, archives, games, etc.) has successfully worked through a symbolic link.

We will also demonstrate a visual guide to create a symbolic link to a specific file. For example, create a symbolic link to the archive “maps”, located on disk C

For this purpose, we enter “mklink /d “D:maps” “C:maps”

In this case, each part of the command is responsible for the following:

  • Mklink is the main command for working with links.
  • /d – key for creating symbolic links to specific files.
  • “D:maps” – the place where a symbolic link will be created.
  • “C:maps” – source (original) of the file.
Using Symbolic and Hard Links in Windows

Important: To perform actions, you need to open a command prompt with administrator rights. Otherwise, the utility will generate an error “You have no enough rights”.

How can I simplify the creation of the symbolic and hard link?

For inexperienced users, working in the command prompt can be quite challenging and inconvenient, so many prefer to use a special utility that adds the ability to quickly create links of different types from the context menu (the menu that appears when you right-click on a file).

One of the most popular programs for quick link creation from the context menu is Link Shell Extension.

The process of symbolic link creation with additional utilities looks like this:

Step 1: Right-click on the desired object and select “Pick Link Source”

Using Symbolic and Hard Links in Windows

Step 2: Go to any directory where the link will be placed. Right-Click on the empty space and choose the item “Drop as”, after which you should select “Hard link” or “Symbolic link”

Using Symbolic and Hard Links in Windows

Regardless of the creation method, the links will function in the normal mode.

Frequently Asked Questions

Symbolic links and hard links are two types of links used in Windows. A symbolic link is a pointer to a file or folder, while a hard link is a direct reference to the file or folder. Symbolic links can point to files or folders on different drives, while hard links can only reference files or folders on the same drive. Additionally, deleting a symbolic link does not affect the original file or folder, while deleting a hard link will also delete the original file or folder.
To create a symbolic link in Windows, open Command Prompt as an administrator and use the command "mklink /d [link name] [target location]". Replace [link name] with the desired name for the symbolic link and [target location] with the path to the file or folder you want to link to. The "/d" flag specifies that the link is a directory.
Yes, you can use symbolic links to move files between drives in Windows. Symbolic links are a type of shortcut that points to a file or folder in a different location. By creating a symbolic link, you can access the file or folder from its original location while it appears to be located in a different directory. This can be useful for organizing files across different drives without having to physically move them.
To delete a symbolic or hard link in Windows, you can use the command prompt. First, open the command prompt as an administrator. Then, use the "del" command followed by the path of the link you want to delete. For example, to delete a symbolic link named "mylink" located in the "C:myfolder" directory, you would enter the command "del C:myfoldermylink". If you want to delete a hard link, use the "fsutil" command followed by the path of the link you want to delete.
Leave a comment

Related Posts

ReFS file system and data recovery
ReFS file system and data recovery
What is the purpose, advantages and disadvantages of the ReFS file system? Below we will compare the differences between ReFS and NTFS and talk about the features of functioning and recovery of lost information from different types of file systems.
Synology DSM VS TrueNAS: which operating system is best for NAS
Synology DSM VS TrueNAS: which operating system is best for NAS
Data storage and access are one of the key aspects of modern life, and the need for reliable and efficient data storage increases every year. One popular solution in this area is Network Attached Storage (NAS) devices. They allow you … Continue reading
Recovering Data from VMFS Partitions
Recovering Data from VMFS Partitions
How to recover data from VMFS partitions – that is, the partitions having VMFS file system used by type 1 hypervisor VMWare vSphere ESXi? Let’s explore possible solutions for such situation.
Linux file system : XFS
Linux file system : XFS
File systems are used to control how data is written to disk, to control access to this data, and to store information and metadata about files. File systems are continually being reviewed to provide more functionality and are becoming more … Continue reading
Online Chat with Recovery Software