Force tracknumber/totaltracks format?

Tags: #<Tag:0x00007f4bf73d15b8>

Is there a way to automatically force the Track Number tag with a format like tracknumber/totaltracks, when I save a file?

If I manually add the totaltracks tag, it will properly convert to desired format. I would like to do this automatically.

i think the only way to have it automatically do it would be with a script.


What file format are you tagging and for what use / which software do you want this? Picard will automatically “tracknumber/totaltracks” notation for tag formats where this is how the track numbers are supposed to be saved (ID3 and APE). So you don’t really need to do anything for those formats.

For other formats you could use a script to put both into the same field:


This should work for Vorbis and ASF/WMA tags. How software deals with this is a different story. If the player just displays it or even expects a slash and parses it accordingly, it would be ok. If the player assumes a number and fails to parse it it might fail.

Also it will fail for MP4, as there are distinct fields for track number and total and both are numeric only. The result will be that the track number won’t get written to MP4 tags if you format it that way.


I use Picard for mp3 files only, to organize my DJ library. I tried this experiment and set with Kid3 the track number to 1, instead of 1/1. When I opened the file in Picard, the totaltracks tag was missing, I had to add it manually. Kid3 has an option to automatically detect and force the track/total number of tracks format and I was wondering if Picard has the same option.

So you mean you want to create this tag if it is not set? If it is not set, how would you set it?

Usually one uses Picard to get metadata from MusicBrainz, which would always provide the tag. We could probably also provide a way to deduce this tag from clusters, as then there is a potentially correct number for this. But I think currently there is no way to have a script get the total number of tracks in a cluster.

1 Like

If you just want to set it to 1 you could use a script like this:


To run this script on your files not yet matched to a MB release right click and choose your script in the “Run script…” submenu.

1 Like

The problem is most of my music is not listed on MusicBrainz, that happens mostly with Electronic music, due to its large variety. The above The Way release is not found:

I manually maintain all my music, including cover art and standard tags, is important for me to have all tags uniform. Picard is great to rename files to a standard format, as well to cleanup extra tags, I need to look into this how is done in Picard, as I currently use Kid3 to remove extra tags on many files.

You can just add it yourself instead of hoping someone will add it for you there are import scripts that will make it faster.


Well, Picard is mostly relying on data added to MusicBrainz, you should rethink your workflow so your work benefits to the whole community and you get most benefits of using MusicBrainz:

  • search for artists and releases in MB database (you can use Picard for that too)
  • check if existing metadata matches what you have
  • edit or add data, including cover art, links, tags
  • open Picard, select your files, select correct release, save them along retrieved metadata
  • you can also add Acoustid fingerprints, ISRCs, etc…

The main benefit here is that Picard will store MBIDs to your music files, and you can retag once in a while to get fresh metadata.
Another benefit: your metadata is shared, online, spread over the internet, it is more unlikely to disappear, compared to be only stored in your own files on your own storage.

Let’s say you add a track titled “My Fancy Tilte” doing a typo, someone else may notice it and fix it, next time you re-tag Picard will retrieve updated title “My Fancy Title” and matching file will be updated (file name and tags).

That’s the whole point of a community-maintained database.