Convert multiple file dates

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Convert multiple file dates

Postby BIGZIPZ » Mon Mar 22, 2021 12:34 pm

Hello.

I have lots of files named with written dates for example:

Apr_1__1925_
Jun_5__1926_
Aug_10__1927_

Is there a way for me to use this program to scan the whole directory of them and change them to:

1925-04-01
1926-06-05
1927-08-10

Thank you.
BIGZIPZ
 
Posts: 2
Joined: Mon Mar 22, 2021 12:30 pm

Convert Month Abbreviations into Numbers, then Rearrange Dat

Postby Luuk » Mon Mar 22, 2021 5:41 pm

The RegEx(1) does this with a checkmark in "v2", and then a "multiple" Match and Replace like...
Jan_(?X)Feb_(?X)Mar_(?X)Apr_(?X)Mai_(?X)Jun_(?X)Jul_(?X)Aug_(?X)Sep_(?X)Okt_(?X)Nov_(?X)Dez_(?X)__(\d)__(?X)(\d\d)_+(\d\d)_+(\d{4})_
01__(?X)02__(?X)03__(?X)04__(?X)05__(?X)06__(?X)07_(?X)08__(?X)09__(?X)10__(?X)11__(?X)12__(?X)__0$1___(?X)\3-\1-\2

Each (?X) separates another Match/Replace. The Replace uses extra underscores just to line up better for the eyesight, then _+ fixes them away.
This to let other users better understand for modifying, like if someone had names with '__1__AnyDate_', then its much better to use...
Jan_(?X)Feb_(?X)Mar_(?X)Apr_(?X)Mai_(?X)Jun_(?X)Jul_(?X)Aug_(?X)Sep_(?X)Okt_(?X)Nov_(?X)Dez_(?X)(\d\d)__(\d)__(\d{4})_(?X)(\d\d)_+(\d\d)_+(\d{4})_
01__(?X)02__(?X)03__(?X)04__(?X)05__(?X)06__(?X)07_(?X)08__(?X)09__(?X)10__(?X)11__(?X)12__(?X)$1_____0$2______$3_(?X)\3-\1-\2

Also, if there can be many dates in one filename, then each Match part needs /g at the end, to fix them all at the same time.
Or you could just keep clicking rename, and then refreshing, to fix them one date at a time.
Luuk
 
Posts: 318
Joined: Fri Feb 21, 2020 10:58 pm

Re: Convert multiple file dates

Postby BIGZIPZ » Mon Mar 22, 2021 6:35 pm

Thank you sir, worked flawlessly
BIGZIPZ
 
Posts: 2
Joined: Mon Mar 22, 2021 12:30 pm

Re: Convert multiple file dates

Postby Admin » Tue Mar 23, 2021 12:04 am

8)
Admin
Site Admin
 
Posts: 2058
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support