# Problem with total number of tracks field

**URL:** https://community.mp3tag.de/t/problem-with-total-number-of-tracks-field/17057
**Category:** Support
**Created:** [July 16, 2015, 2:46pm UTC](https://community.mp3tag.de/t/problem-with-total-number-of-tracks-field/17057 "2015-07-16T14:46:22Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [July 17, 2015, 8:06am UTC](https://community.mp3tag.de/t/problem-with-total-number-of-tracks-field/17057/4 "2015-07-17T08:06:18Z")

</div>

> [@Nevillet](#):
>
> ... I've looked at the help entry you mentioned but I still don't get it. ...

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?](https://community.mp3tag.de/t/16845/3)

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

---

_[View the full topic](https://community.mp3tag.de/t/problem-with-total-number-of-tracks-field/17057)._
