How to replace files with equivalent hard links?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

How to replace files with equivalent hard links?

Post by Raindrops »

I have a collection of files spread of multiple external USB HDDs.

But this collection is too large.
So I kept selecting the best files on every subject, and copied them in a dedicated folder for quick reference.
I kept this folder on my default fixed HDD.

Over the last 20 years, this "quick reference" folder has also become too large (100 GB).
It is creating space constraints on my fixed HDD.

So instead of storing local copies of files, I would like to create a reading list using hard links.

So the task before me is this:
1. Take each file in my reference folder, and locate the same file on my removable HDD
2. Replace the file in my reference folder with a hard link.

But this needs to be repeated thousands of times.
Is there a quick way to do this (preferably script)?
Post Reply