Problem with total number of tracks field

Hi All,

I am trying to rename my mp3 album files so that the file name includes the track number and total number of tracks on the album.

I'm using the following string but the total is not displayed in the file name:

%artist% %year% %album% %track% of %_total% %title%

An example result using the above follows:

Gorillaz 2010 The Fall 01 of Phoner To Arizona

Many thanks.

Neville

Hello new user, ...
see Mp3tag Help Manual, Configuration/Export/Placeholders/Metadata ...
the system variable %_total% delivers a value only in the case of ...
when the total number of tracks is stored into the tagfield TRACK ...
in the format "track/totaltracks".

DD.20150716.1937.CEST

Hello DetlevD and others.

I'm sorry but I don't understand. I've looked at the help entry you mentioned but I still don't get it.

I guess what i'm asking for is a step-by-step procedure.

Again, please forgive my dumbness.

Thanks

The manual says: %_total% Total number of tracks from xx/xx track-number field

Before you can use the content form the variable %_total%, for example for renaming purposes, you have to make sure, that the tagfield TRACK contains a data structure as of "tracknumber/totaltracknumber", for example "08/15".
In this case the variable %_total% will be able to return the value "15", ...
even when only one file has been selected.

At first you can prepare a tagfield TOTALTRACKS.
Select all files from a logical set of files (folder, album or such), for example 5 files.
Then apply ...
Action: Format value
Tagfield: TOTALTRACKS
Formatstring: %_total_files%
All files will get the tagfield TOTALTRACKS filled with the number "5".

Then apply ...
Action: Format value
Tagfield: TRACK
Formatstring: $if(%TOTALTRACKS%,%TRACK%'/'%TOTALTRACKS%,%TRACK%)

Now all the tagfields TRACK should contain a text string, for each ...
"1/5", "2/5", "3/5", "4/5", "5/5".

Now you can use the variable %_total% for renaming purposes.
If the tagfield TOTALTRACKS still exists, then you may use the value variable %TOTALTRACKS% for the same purpose.

See also ...
What is the correct format for numbering tracks?

Note: The media file type MP4 can hold only one numerical value in its track tagfield.
For MP4 Mp3tag delivers the variable %_total% as empty.

DD.20150717.1254.CEST, DD.20150722.1955.CEST