PDA

View Full Version : Add leading zeros to numbers within file names



JLe
11-26-2010, 06:37 AM
I have lots of folders consisting of files which are named as
Track 1.mp3
Track 2.mp3
...
Track 9.mp3
Track 10.mp3

which I want to change into
Track 01.mp3
Track 02.mp3
...
Track 09.mp3
Track 10.mp3

to enable proper sorting on names. I have looked for a wildcard option that lets me search for a single digit and replace this with a zero followed by the same digit - to no success?

Any suggestions how to accomplish this?

smith0greg
05-15-2011, 02:16 PM
Click on the 'Find and Replace' tab at the bottom
Make sure you select 'Find using Regular Expressions'
Find: " 1$"

smith0greg
05-15-2011, 02:21 PM
Replace: " 01" (without the quotes, in both cases)

This will rename "Track 1.mp3" to "Track 01.mp3"
The dollar sign indicates that the "1" has to be the last character in the file name.
You will have to repeat the rename process for 2,3,4,5,6,7,8,9