Keep file that start with (e.g.) donot_remove but remove the other

The best solution for finding and removing duplicate files.
Post Reply
dcwul62
Posts: 53
Joined: Mon Jun 10, 2013 9:51 am

Keep file that start with (e.g.) donot_remove but remove the other

Post by dcwul62 »

Duplicate Cleaner Pro

finds duplicates based on the hash. They are downloaded images.

Within each group one file starts with a specific word (e.g. 'donot remove, or 'keep'', or whatever)
Q: how to select inverse select files that start with, or contain, a specific text string.

In my case, select all duplicates that do not start with 'Keep'.

Note: I can't use the option to invert select based on longest filename.

Thanks.
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Keep file that start with (e.g.) donot_remove but remove the other

Post by DigitalVolcano »

You could use the 'Mark by text' tool with a regular expression -

Code: Select all

^keep
(this is probably case sensitive)

Then invert the marked files (Selection Assistant).
dcwul62
Posts: 53
Joined: Mon Jun 10, 2013 9:51 am

Re: Keep file that start with (e.g.) donot_remove but remove the other

Post by dcwul62 »

Wonderful!
Thank you very much indeed for the quick reply.
Obviously (being new to Duplicate Cleaner) I wasn't aware of this option.

I used this 'keep'-option and probably for more than 95% it works fine, really.

Duplicate Cleaner 'warns' that all duplicates within 1 group may also be deleted (duplicate files -not- having the 'keep' word).
DC shows them with an exclamation mark, like these:

Image

I hardly dare to ask but is there a way to also keep 1 of them at the same time as with using this 'keep' option.
If not, no problem, I'll deselect them one by one.

Thanks again!
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Keep file that start with (e.g.) donot_remove but remove the other

Post by DigitalVolcano »

You may have to filter the groups will all marked (there's a filter to do this) and then unselect them manually if there isnt too many
dcwul62
Posts: 53
Joined: Mon Jun 10, 2013 9:51 am

Re: Keep file that start with (e.g.) donot_remove but remove the other

Post by dcwul62 »

Found it, many thanks again.
Post Reply