Add track number to title song


Hi! I’m trying to rename my title song tag and add track number automatic, my car read tags bur it order by alphabetically. Is it possible

Sorry bad english


If I understand you correctly, yes it is possible. In fact, it might even be the default naming script in Picard. The typical starting point for file naming script in Picard is something like:

%albumartist%/%album%/$if($gt($if2(%totaldiscs%,1),1),$if2(%discnumber%,1)-,)$num($if2(%tracknumber%,1)) %title%

This will rename your files and organize them by album artist and album, and include two-digit track number (and the disc number if from a multi-disc set) at the start of the track title. For example:

Queen/Queen Forever/1-06 You're My Best Friend.mp3

For the full set of script functions see Scripting Documentation and for the available tags, see Tags Documentation.

You might also want to have a look at one or both of the following threads for more ideas regarding Picard file naming scripts:


but my question is in title tag not in filename


Sorry, I misunderstood.

For that, you should be able to do it in a script. Off the top of my head (untested) I think it would be something like:

$set(title,$if($gt($if2(%totaldiscs%,1),1),$if2(%discnumber%,1)-,)$num($if2(%tracknumber%,1),2) %title%)

That would go in the Scripting section of Picard’s options.


Thanks for reply,
your code gives me error:
“Wrong number of arguments for $num: Expected 2 - 2, got at position 94, line 1”

I also try $copymerge(title,tracknumber) but it add to end not in start and one only digit


I had forgotten to include the number of digits when padding the track number. I’ve edited the line in the message above to add the missing “,2”, and tested it here in Picard 1.4.1. I believe this now does what you’re asking.


you code is perfect
very very thanks!!!