Page 1 of 1

Rename parts of file name

Posted: Fri Mar 15, 2024 1:53 pm
by sk2107
Hello,

I have few files which have the same name format (all of them have date in same location without dashes in between). so I want to add dashes between these numbers.

for example:


BU#20080409(005).jpg will be BU#2008-04-09(005).jpg
BU#20080603.jpg will be BU#2008-06-03.jpg


Thank you

Re: Rename parts of file name

Posted: Fri Mar 15, 2024 2:53 pm
by therube
Enable Regular expressions (& Ignore extension - only so you don't have to deal with them)

Code: Select all

Old: ^BU#(\d{4})(\d{2})(\d{2})(.*?)
New: BU#\1-\2-\3
find 4 digits, find 2 digits, find 2 digits, discard anything else that follows
stick dashes between the 3 sets of digits

(In Everything 1.5alpha, you can save that as a Preset, if you use it often.)

Re: Rename parts of file name

Posted: Fri Mar 15, 2024 3:01 pm
by sk2107
Nice. Thanks a lot.

Best Regards