Page 1 of 1

Search for files with specific naming convention

Posted: 28 Feb 2025 12:42
by CCarmichael
Hi,

I'm trying to unify how a large collection of images are named, however some over time have had a different last number format applied i.e. end with 2 numbers instead of 3 as demonstrated below, and I was wondering whether it were possible to search for these specific files using a script.

Some examples are:
Files I want to find so I can rename them: set-title-date taken-01.jpg
Files I want to ignore from the search: set-title-date taken-001.jpg

Does this make sense? Is this possible?

Any help would be greatly appreciated.

Re: Search for files with specific naming convention

Posted: 28 Feb 2025 13:03
by highend
You can simply do this via a normal search term: >.+?-\d{2}\.jpg$

Re: Search for files with specific naming convention

Posted: 28 Feb 2025 15:42
by CCarmichael
That's brilliant, thanks very much.

Re: Search for files with specific naming convention

Posted: 05 Mar 2025 17:33
by admin
A simpler non-regexp would have done the job as well: *-##.jpg

PS: This needs a tick at "Configuration | Find and Filter | Find Files & Branch View | Find Files | Enable extended pattern matching", otherwise # does not stand for "any digit". Alternatively use the E switch: *-##.jpg /E.