Hi there! I am in a Directory Opus Pro trial and still getting the hang of things. Most stuff seems straightforward and I am really enjoying it so far. Anyway... here is what I would like to do. I found some partially related posts, but from over 10 years ago so I didn't want to cobble together bits from old conversations.
I would like to find duplicate files and delete duplicates (based on MD5) that are within the same folder, but not from across multiple folders. I will give an example to explain/clarify.
Running Duplicate File Finder (based on MD5) on C:\Test
In C:\Test exists folders TestA and TestB
C:\Test\TestA
File1
File2
File2 (it would have a different filename, of course, but based on MD5 is the same as File2)
C:\Test\TestB
File1
File1
File2
Those instants of duplication, the files have different names but are the same based on MD5.
Up to this part... no issues, DO is clear and works great.
Now what I want to do, if possible, is automatically (or easily without going 1 by 1 manually) delete all but one copy of a file on a per directory basis.
So in my example case, one instance of File2 would be deleted from TestA, but it would NOT be deleted from TestB. And one instance of File1 would be deleted from TestB, but it would NOT be deleted from TestA.
I hope that is clear, thanks in advance for the help.
It works perfectly at finding and selecting the files!! Thank you very much.
I cannot, though, seem to delete them? Haha. Not sure if that is script related at all, might just be brain related for me.
I tried both with and without the recycle bin target and nothing happens. I hit delete (the button in the Dupe Finder, not the main toolbar) and nothing. If I choose the Delete option for with or without recycle, also nothing.
I am probably confused, haha. Ok, so immediately after running your amazing script (thanks again!), and not doing anything else, this is where I am at:
I see!!! Ok, so I then change the selection in that box to the name of the collection at the top. Then, while the Delete button is still inactive, I can hit Select and then I can simply delete with the delete key on the keyboard or right click and delete. That seemed to work!
After selecting files the Delete button should become active. If it doesn't but you can still delete via keyboard, well... The Find panel is indeed a bit mysterious
Understood and really not a massive issue. I am currently about to run this thing on a massive number of folders (around 2000), lol. I just added one to the end named "Zzzzz" and put some dupe text files in it. It's currently working it's way through the folders, I'll report back how it goes!
It worked perfectly... thanks for the huge time saving. If you have PayPal or Venmo or something where you'd be comfortable with me buying you a coffee or beer, let me know.