X of Y extrapolations

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

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.

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

See here ...
/t/12767/1

DD.20111201.1956.CET