Replacing - how to transform to word (from name) to number

Advanced Renamer forum
#1 : 28/11-23 18:16
Eng.DarkAlchemist
Eng.DarkAlchemist
Posts: 10
I team,
I'm trying to rename files using a numbering gotten from file name.
i.e. my files are: SPPayslip 1_2021_Run1; SPPayslip 1_2021_Run2; ... SPPayslip 10_2021_Run1; SPPayslip 10_2021_Run2;...

I want to rename using: "Personal" <word:3><word:2> <word:4> - but since <Word:2> is a month number, I want to change it to "01", "02"... "10"... (like in the tag <Inc Nr:x:y>). Is there any way to change the word to number so to force a certain number of zeros?
The end names should be: Personal 202101 Run1; Personal 202101 Run2;...

Second. Is there "if" in order to replace: if "Run1" to "15"; if "Run2" to "30" (in the word:4) - in a unique step instead use 2 additional methods?
i.e. if <word:4>="Run1" change to "15" \ if <word:4>="Run2" change to "30" - in replace method.

Note: could provide also a script?


28/11-23 18:16 - edited 28/11-23 18:17