Changing Date format help

Advanced Renamer forum
#1 : 15/05-20 17:20
xander
Posts: 1
Hello,

I'm trying to find a way to rename the date format of my files as follows:

1) Original

[03 1, 1980]Filename1.txt
[12 17, 1990]Filename2.txt


2) Want to be renamed with the data format inside the square brackets changed to YYYYMMDD

[19800301]Filename1.txt
[19901217]Filename2.txt

Thanks,
#2 : 15/05-20 19:39
David Lee
Posts: 1125
You will need to do this using two methods - both in the same batch:

1) Zero-pad the day to 2 digits
2) Reformat the date

1) Renumber method:
Number position: 2
Change to: Relative to existing number
Number difference: 0
Zero padding: Manual
Number length: 2

2) Replace method...
Text to be replaced: \[\K(\d{2}) (\d{2}), (\d{4})
Replace with: \3\1\2

If any of your filenames have a single digit month you will need to add a second Renumber method (before the Replace) to zero-pad the month to 2 digits - exactly the same as the first but with Number position: 1