I have a series of filenames as follows
1.2.2
1.2.3
1.2.4
1.10.1
1.10.2
I would like to convert them to the following format
1_002_002
1_002_003
1_002_004
1_010_001
1_010_002
So basically, I need the second and third digits to have three characters in each and the decimal replaced with an underscore.
Thanks in advance.
I think I need to split the string into three and add leading zeros but don’t know how to do that in Powershell.
New contributor
Jarrod Harkness is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.