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.
Search for files with specific naming convention
-
CCarmichael
- Posts: 15
- Joined: 28 Apr 2022 13:07
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Search for files with specific naming convention
You can simply do this via a normal search term:
>.+?-\d{2}\.jpg$One of my scripts helped you out? Please donate via Paypal
-
CCarmichael
- Posts: 15
- Joined: 28 Apr 2022 13:07
Re: Search for files with specific naming convention
That's brilliant, thanks very much.
-
admin
- Site Admin
- Posts: 66091
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Search for files with specific naming convention
A simpler non-regexp would have done the job as well:
PS: This needs a tick at "Configuration | Find and Filter | Find Files & Branch View | Find Files | Enable extended pattern matching", otherwise
*-##.jpgPS: 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.FAQ | XY News RSS | XY X
XYplorer Beta Club