|I have a batch script to rename files and at the moment I have files:|
So the same prefix but with different numbers of characters after the underscore (_).
I would like to rename these files to have all of them with the same number of characters (4 characters), as:
So I am not sure how to make the script detects when the file name has less than 4 characters after the underscore (_) and fill it with zeros so all files with the same length.
I am renaming the files on the way below (for the 2 characters files...)
for %%j in (Record*.png) do (
ren "%%j" "Record_00!iname!.png"
Many thanks! :D