Page 1 of 1

Move date already in title to Start of File Name

PostPosted: Sat Mar 26, 2022 1:23 pm
by please55
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

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

PostPosted: Thu Mar 31, 2022 5:42 pm
by therube
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.