How to rename files leaving part of file name unchanged

Advanced Renamer forum
#1 : 14/06-19 07:59
Chad Turner
Chad Turner
Posts: 2
1) Replace: Replace using wildcards "1 - January 19**-" with "19**-01-" (skip extension)
2) Replace: Replace all "2 - February 19**-" with "19**-02-" (skip extension)
3) Replace: Replace all "3 - March 19**-" with "19**-03-" (skip extension)
4) Replace: Replace all "4 - April 19**-" with "19**-04-" (skip extension)
5) Replace: Replace all "5 - May 19**-" with "19**-05-" (skip extension)
6) Replace: Replace all "6 - June 19**-" with "19**-06-" (skip extension)
7) Replace: Replace all "7 - July 19**-" with "19**-07-" (skip extension)
8) Replace: Replace all "8 - August 19**-" with "19**-08-" (skip extension)
9) Replace: Replace all "9 - September 19**-" with "19**-09-" (skip extension)
10) Replace: Replace all "10 - October 19**-" with "19**-10-" (skip extension)
11) Replace: Replace all "11 - November 19**-" with "19**-11-" (skip extension)
12) Replace: Replace all "12 - December 19**-" with "19**-12-" (skip extension)

I want to use something like this. The star symbols represent the last 2 numbers in a date I want to stay the same. This way turns the file name numbers into star symbols. I don't want that. How can I accomplish leaving the last 2 numbers of the year date as they are in original file name, yet leave it flexible enough as to not represent the exact year so it will change many years worth of files in one go with just 12 rules??? I tried a few different things based on the FAQ info, but nothing worked sadly... Also not seeing anything in forum. Please help.

Example:

original-

1 - January 1957-
1 - January 1958-
etc...

corrected-

1957-01-
1958-01-
etc...


14/06-19 07:59 - edited 14/06-19 09:23
#2 : 14/06-19 12:28
David Lee
David Lee
Posts: 1125
Reply to #1:
You haven't defined your problem very well. Is the initial number the day of the month or is the month represented twice - as a number and as a name?

However your difficulty appears to be with the year so I will assume the simpler case of the latter.

First use the Renumber method to convert the first number to 2-digits...

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

Then add the Replace method, using a Regular Expression...

Text to be replaced: (\d\d).*(19\d\d)(.*)
Replace with: \2-\1\3
Use regular expressions

Explanation...
(\d\d) captures two digits as \1
.* matches any number of characters but does not capture them
(19\d\d) matches 19 followed by any two digits and captures the match as \2
(.*) then captures any remaining characters as \3

The replace string simply rearranges the captured groups and adds a dash between the month and the year.




14/06-19 12:28 - edited 14/06-19 12:29
#3 : 14/06-19 18:16
Chad Turner
Chad Turner
Posts: 2
Reply to #2:
It's the month represented twice, yes, thanks I will try that. It seems to work great. Sorry I didn't explain better, and thanks for the help.


14/06-19 18:16 - edited 14/06-19 18:53