Move date already in title to Start of File Name

Bulk Rename Utility How-To's

Move date already in title to Start of File Name

Postby please55 » Sat Mar 26, 2022 1:23 pm

Hello

I have a number of files that unfortunately don't follow a specific format but each of them contains a date in the XXXX-XX-XX format. Is there a way for BRU to look up that date format wherever it is in the file name, cut it out, then append it to the start of the file name?

Please even if you don't have the specific solution, it will be helpful to just know if this is something possible. There's only so many youtube videos worth investing my time into for the project.

Thank you
please55
 
Posts: 1
Joined: Sat Mar 26, 2022 1:16 pm

Re: Move date already in title to Start of File Name

Postby therube » Thu Mar 31, 2022 5:42 pm

As a start...

1:RegEx
Code: Select all
Match:  (.*)(\d\d\d\d-\d\d-\d\d)(.*)
Replace:  \2     \1 \3

\1 (find anything)
\2 (find a "date", four digits-two digits-two digits)
\3 find all else
& rearrange, date, \2, first...

I added a number of spaces between the date & the other parts - only so it stands out.
You'll want to adjust to your needs.
therube
 
Posts: 1310
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To