# X of Y extrapolations

**URL:** https://community.mp3tag.de/t/x-of-y-extrapolations/12755
**Category:** Support
**Created:** [November 29, 2011, 11:41pm UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755 "2011-11-29T23:41:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fatdogscott](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@fatdogscott](https://community.mp3tag.de/u/fatdogscott)
#### Post date: [November 29, 2011, 11:41pm UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755/1 "2011-11-29T23:41:13Z")

</div>

I've searched through the forums for this, but thus far have not found anything remotely like it. I realize some do not prefer the following naming convention, but I do.

I'm trying to develop a script that will seek out the "of Y" number for the total number of disks, and tracks on each disk, so I can add it to the file name. I'd like my file names to look like this:

Standard single artist convention (i.e. Box Sets, Greatest Hits):  
"....\Albums\%artist%\%album%\%Disk X of Y%\%artist% - %album% - %disk% - %track A of B% - %title%"

Multiple artists' compilation convention (i.e. Greatest Hits of the 70's):  
"....\Compilations\%album%\%disk X of Y%\%album% - %disk X% - %track A of B% - %artist% - %track% - [%year of original release%]"

Where:  
X is the current disk number  
Y is the total number of disks in the collection  
A is the current track number  
B is the total number of tracks on that CD

Can anyone give me some advice on how to do this in one fell-swoop?

Any help would be greatly appreciated. I have MANY compilation albums that I'd like to do this to, and as expediently as possible.

-Shooter

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [November 29, 2011, 11:57pm UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755/2 "2011-11-29T23:57:29Z")

</div>

Is the value of Y contained in a tag anywhere? Say a TOTALDISCS or a TRACKTOTAL field, or maybe your track numbers are written 'X of Y'. If so, it's doable. Otherwise, it's not. Mp3tag has no way to figure out how many discs are in a set, nor how many tracks are in an album.

The best you could do would be to add two new fields to the Tag Panel on the left, manually enter the numbers, do a save, then use an action group to rewrite the file names based on those numbers.

---

<div class="post-metadata">

### Author: ![fatdogscott](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@fatdogscott](https://community.mp3tag.de/u/fatdogscott)
#### Post date: [November 30, 2011, 12:07am UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755/3 "2011-11-30T00:07:14Z")

</div>

> [@JJ Johnson](#):
>
> Is the value of Y contained in a tag anywhere? Say a TOTALDISCS or a TRACKTOTAL field, or maybe your track numbers are written 'X of Y'. If so, it's doable. Otherwise, it's not. Mp3tag has no way to figure out how many discs are in a set, nor how many tracks are in an album.

Hmmm, not in any tags, as of yet. As it is I'm having to manually enter "of B" for song total, and "of Y" for disc total.

I was hoping there would be some way of counting the total number of songs in a path with the same 'album name' and 'disc number' to calculate B. And for the former, I was hoping there was a way of counting up the total number of 'discs' in the 'DISCNUMBER' field for the album of the same set of names to calculate Y.

-Shooter

disK or disC?? Hmmm

---

<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: [December 1, 2011, 5:57pm UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755/4 "2011-12-01T17:57:06Z")

</div>

> [@Shooter](#):
>
> ... a script that will seek out the "of Y" number for the total number of disks, and tracks on each disk ... Any help would be greatly appreciated. ...

See here ...  
[/t/12767/1](https://community.mp3tag.de/t/12767/1)

DD.20111201.1956.CET

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/x-of-y-extrapolations/12755/5 "2026-02-09T12:23:28Z")

</div>


