Links, an Alternative to Duplicate Deletion

Last modified: September 19, 2025

Links


Removing duplicates primarily addresses a common issue: limited disk space. Identical files can accumulate over time, consuming multiple gigabytes unnecessarily.

An effective alternative is to **replace these duplicates with links**. Rather than permanently deleting the copies, this approach maintains access to the files while eliminating redundancy. Using this method, you can free up disk space without actually deleting the files… almost like magic!


What is a link?


A link is essentially a reference that provides access to a file from another location in the file system, **without duplicating its content**. There are two main types of links: symbolic links and hard links. The three diagrams below illustrate how each type works.


Case 1 – Distinct files:
No links

This is the most common case: there are no links connecting the files. Files File1 and File2 are independent, each referenced by its unique path.

Case 2 – Hard links:
Hard links

Both paths now point to the same physical file.

Hard links are equivalent: neither path has priority. To delete the file from storage, both paths must be removed.

Case 3 – Symbolic links:
Symbolic links

In this case, one path points to a second path via a symbolic link, which in turn leads to the target file.

Deleting the target file C:\Dir\File2.txt will remove the physical file, but the symbolic link C:\Dir\File1.txt will remain. However, this link will no longer point to any file and will therefore be considered broken.

Final result: After creating links, all access paths are preserved, but they all point to the same physical location on the disk, allowing for significant space savings.


"There is no limit to the number of links that can point to the same target file."


Note: Since there is now only one physical file, any modification made through one of the paths will automatically affect the file accessible via the other paths. Depending on the context, this can be an advantage (centralized modification) or a drawback (risk of unintentional changes).

Different ways to link files in Windows:

Although symbolic and hard links have long existed on UNIX, their integration into Windows came relatively late and progressively across versions. Before that, Microsoft had implemented other mechanisms, such as junctions and shortcuts, which are still present today mainly for backward compatibility reasons.



Link Types Use Limitations
Hard
  • Directly points to the file's physical location
  • All links to this file must be deleted to remove the physical file
Links only to local files
Symbolic
  • Allows redirection to a file or folder
  • Symbolic links can be cascaded
  • The target file/folder can be local or on the network
Deleting the target file breaks the link and renders the symbolic link inoperative
Junction Predecessor of symbolic links but only for folders Links only to local folders
Shortcut Access to the target file via Windows Explorer or Desktop Not recognized by the file system

How to convert duplicates into links on Windows?

The first step is to identify duplicates, usually with the help of specialized software.

The second step is to create the links. You can use dedicated tools, such as the mklink command or certain graphical applications, but transitioning from step 1 to step 2 can be challenging.

Two main issues arise:

Unless you are comfortable with scripting, it is recommended to use an all-in-one software that automates both steps. To date, the only tool I know that does this efficiently is Duplicate Media Finder. It can detect duplicates, automatically select the target file according to a defined criterion, and create the links to that file. A very comprehensive tutorial explains the process of creating links with Duplicate Media Finder in detail.