Changing track number format from x/y to x

For quite some time, I've been "annoyed" by the variations of track number formats in my MP3 files. Some have just digits (my preference), some have leading zeros, some have x/y, and so on. I haven't been able to come up with an easy way to change them. Until now!

V2.51's Convert Tag-Tag function works a treat, but it took a little while to work out how to do it.

Just set the FIELD set to TRACK, and the FORMAT STRING to $add(%track%,0)

I hope this helps someone else.


There is a dedicated function for track number formatting which should be used:


Hi, Dano. $num is not a dedicated function for track numbering, it's a general purpose function for turning a number into a string with leading zero padding to the specified number of digits. It can't do what I wanted to do.

The $add function works (as far as I can tell) because it converts the existing track number string into an integer, which effectively drops any zeros before the number, and any non-numeric characters after the track number. It then adds the second argument (in my proposal a zero) to the track number, then converts it back to a string. That's exactly the function that I required to standardise my track numbers, and I thought it may be useful to others.

Regards, Peter

Why not? $num also deals with the x/y format:
$num(5/9,1) => 5