Page 1 of 1

How to add zeros in start of each file name up to 3 digits

PostPosted: Thu Jan 19, 2017 1:28 pm
by aftabnabi
I would like to add zeros in start of each file name up to 3 digits through BRU.

I have following files:

1.mp3
11.mp3
10.mp3
100.mp3
101.mp3
141.mp3

I want to get following output:

001.mp3
011.mp3
010.mp3
100.mp3
101.mp3
141.mp3

Please help me solve above situation with BRU.

Thanks

Re: How to add zeros in start of each file name up to 3 digits

PostPosted: Thu Jan 19, 2017 7:42 pm
by JMM
I do something like you need very often, in the following way:
* Be sure you have the column Length displaying. If not, right-click on the column headers, and select Length on the menu which appears.
* Now put a 0 on Prefix at criteria 'Add (7)'.
* And now repeat the following steps until you're satisfied:
1. Sort the filenames by length.
2. Select the shortest filenames of the same length.
3. Click 'Rename' to add the 0 at the beginning.

The first time you should have selected the files with length 1, after the first time, you'll have all files with at least 2 digits. Then, the second time you should have selected all the files with length 2, and after the 2nd time you'll have all files with at least 3 digits.

This can also be done running some RegEx consecutively, but I don't think you want to go there.