I used Sound Juicer to rip a CD of audio for a language learning book so that I could listen to them on my Android. However, Sound Juicer seems to only have the option of numbering files without leading zeros. Like this:
track_1.mp3
track_10.mp3
track_11.mp3
This leads to some confused ordering on my music player. So, I want to add some zeros to the name, so that they're ordered properly, like this:
track_01.mp3
track_02.mp3
track_03.mp3
How do I accomplish this? I tried using GPRename, but while it has the ability to add numbers, it doesn't seem to have any options for adding leading zeros.
Is there a better program or something I can do at the command line?
track_
string. Mine needed editing anyway to make it work on this question. – Jacob Vlijm Jul 28 '14 at 15:58rename
method and expand the question for prefixed options. – Oli Jul 29 '14 at 08:00rename
in Ubuntu is the Perl-based one, and can do anything Perl can, and so is sufficiently powerful to handle such changes in input.rename -n 'my ($first,$second)=split("_");$_=join("_", $first, sprintf("%02d",$second))' *
can do that, and I think simpler ways would exist in Perl. Since the question is closed, I can't add an answer. – muru Jul 29 '14 at 08:35