How to avoid slash in track number?

I’m a newcomer to Picard, and love what it does. I have it configured almost exactly how I want it, but I’m getting track number tags in the form n/n (e.g. 1/12), when I simply want a 2-digit track number (e.g. 01).
How can I get the track number to appear as a simple 2-digit number, without the slash?

1 Like

To get the track number to appear as a two-digit number use the $num() function, like:


Please see the following thread

1 Like

Thanks for the feedback, and the link to the other thread. I’ve tried a couple of the suggestions, but my track numbers are still being set to “n/n”.

My tagging script looks like this:



EDIT: Sorry just closed and re-opened Picard. Half of the problem is now resolved - I’ve lost the slash, but the track numbers are not 2-digits - i.e. I get 1 instead of 01

The tag needs to be actually set to the new value:

1 Like

You just need to reload the already loaded releases on the right so the scripts run again. No need to restart Picard.

1 Like

That’s perfect - many thanks. I’m still getting my head around the scripting syntax!
God I wish I’d discovered Picard years ago…


Great it works for you and thanks for the nice words about Picard :slight_smile: Please excuse my short previous responses, but was just answering in between other tasks.

UPDATE: And for scripting maybe Writing a File Naming Script — MusicBrainz Picard v2.8.5 documentation can give you a feeling for it. It’s about file naming scripts, but the way things get explained step by step maybe helps getting more familiar with the scripting syntax.


Many thanks for the link - I’ll take a look