Duplicate Selection/Mark by text pattern

The best solution for finding and removing duplicate files.
Post Reply
RangerGord
Posts: 3
Joined: Sat Jul 09, 2016 2:20 pm

Duplicate Selection/Mark by text pattern

Post by RangerGord »

I have mp3 files that start with the track # e.g. “02-songname…”.
I have duplicates that instead of the dash there is a blank space e.g. “02 songname…”.
I want to mark the duplicates of the latter type, i.e. the ones with spaces instead of the dash.
I think there is a method called the text pattern. I find it confusing and not sure how it works.
Any suggestions? Help appreciated.
User avatar
therube
Posts: 614
Joined: Tue Jun 28, 2011 4:38 pm

Re: Duplicate Selection/Mark by text pattern

Post by therube »

Selection Assistant -> Select by text pattern
- Use Regular Expressions

Code: Select all

^\d\d\s
Says to find names that start with two digits followed by a space (followed by anything).

Code: Select all

02    songname.txt
02 songname.txt
02-songname.txt
So it should find:

Code: Select all

02    songname.txt
02 songname.txt

Check your results.


If you only wanted files with a single space after the digits, you could use something like this:

Code: Select all

^\d\d\s{1}\S
RangerGord
Posts: 3
Joined: Sat Jul 09, 2016 2:20 pm

Re: Duplicate Selection/Mark by text pattern

Post by RangerGord »

Perfect! That worked.
Thanks mucho
Post Reply