Duplicate Files: Delete all duplicates in the same folder

Vainly tried to find an answer and/or previous thread on this :
How to delete all duplicate files in the same (selected) folder?

For example: one might find duplicate files in
FolderA
FolderB

A number of files in FolderB are also in FolderA, all other files in FolderB are unique.

I'd like to delete all duplicate files in FolderB, that are also available in FolderA, but instead of tagging them all one by one
(a boring job in case of many files, also possibly leading to tagging the wrong ones), I'd like to simply select the option to
"Select all duplicate files in this folder".

Any suggestions?
Or new feature?

TIA

If you sort by location (the same as in your Duplicate File Finder: Option - select by shortest path post) then you can influence whether the first FolderA or the first FolderB file is kept while the others are deleted.

If there are multiple duplicates of each file that you want to keep in FolderA then it's a bit more complicated:

  • Do the duplicate find, and then close the utility panel so the lister goes back to normal mode, without checkboxes.

  • Make sure nothing is selected to begin with.

  • Use Edit -> Select by Pattern.

  • (Click Advanced if it opens in simple mode.)

  • Make sure the Action: drop-down is set to Select matching items.

  • Set the filter to whatever you want. e.g. Location - Match - *\FolderB(|\*) - Use wildcards

  • Click OK and the files you want to delete should now be selected. Double-check that everything is as you want it, then delete them as you would normally.

1 Like

Thanks again.

Yes, in this case I am talking about multiple duplicates in maybe 4-5 different folders. Restores, wrong copying, etc.
I was a bit hoping on something like a new context menu item doing the job in the title.

I'll give the below a try.

Am also getting a bit of strange resuls selecting by shortest path, but will reply in that thread.

=