I have multiple folders containing thousands of deletion-recovered files from multiple recovery scans.

As per usual with deletion recovery, the recovered files have different names than the originals, and different names from one recovery scan to another.

So, short of writing a custom program, is there a tool (or product) that can compare files by content and ignore the filenames?

Ideally, it would allow deletion of recovered files when they content-match files in an "original" directory tree (e.g. iTunes library folders), and, allow merge of two folders based on file contents rather than filenames.

  • I have and use Gemini: The Duplicate Finder, now Gemini 2: The Duplicate Finder and am very happy with it. Other then being a paying customer and user of this product, I have no other affiliation with MacPaw Inc, the makers of this product. It's a paid app, but IMO well worth the price for what it does. Apr 22, 2017 at 17:44

1 Answer 1


Why wouldn't you have a script to loop over all the files and rename them with the value of a hash based on the file contents.

md5 file.png 
MD5 (file.png) = d5438a3187b73fa362dceb269e158908
crc32 file.png 
shasum -a 256 file.png 
34d126a6990b59dd45a4d7d19e471943569060bc54cb3b42b3d0be1934f16f11  file.png

I've listed these in order of fastest to slowest on my Mac - you should test for a few files if you can't just let the script run overnight and do care about performance of the script.

Then you could merge based on file name since the same content would be the same name, barring any collisions in the space of the hash.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .