# Saving total count of tracks into a separate tag?

**URL:** https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912
**Category:** Support
**Created:** [June 1, 2024, 11:26am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912 "2024-06-01T11:26:23Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![dolezvo1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@dolezvo1](https://community.mp3tag.de/u/dolezvo1)
#### Post date: [June 1, 2024, 11:26am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/1 "2024-06-01T11:26:23Z")

</div>

Hi, I was wondering if it would be possible to introduce an option to save the total count of tracks into a separate tag (such as `TRACKTOTAL`) after track renumbering, or if it is already possible to do automatically?

I am aware of this option in the Auto-numbering Wizard, but it saves the track total into the `TRACK` tag in the format `TRACK/TRACKTOTAL`, which is not what I'm looking for 😕

 ![image](https://community.mp3tag.de/uploads/default/original/3X/7/0/70a3604f1bbd2029fef348bfb3a7bf6488c5cf83.png)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 1, 2024, 11:28am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/2 "2024-06-01T11:28:37Z")

</div>

You could extract the part after the / from TRACK and write it in TOTALTRACKS?

For example with Convert Tag -\> Tag:  
Field:  
Whatever tag you want to use as target, like  
`TOTALTRACKS`

Format string:  
`$regexp(%TRACK%,.*/(.*),$1)`

![image](https://community.mp3tag.de/uploads/default/original/3X/d/8/d8f24b89093257c2f0b020d362006a78308eef7d.png)

---

<div class="post-metadata">

### Author: ![dolezvo1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@dolezvo1](https://community.mp3tag.de/u/dolezvo1)
#### Post date: [June 1, 2024, 11:36am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/3 "2024-06-01T11:36:48Z")

</div>

Thanks for the reply. You're right, I definitely could do that, but I was hoping for something simpler (set-and-forget, so to say). Not to mention I do not want the TRACKTOTAL in the TRACK tag at all, so I would have to remove it afterwards.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 1, 2024, 11:41am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/4 "2024-06-01T11:41:46Z")

</div>

> [@dolezvo1](#):
>
> so I would have to remove it afterwards.

Until such an option will be introduced, you could use - as a second step after the first above:

Field:  
`TRACK`  
Format string:  
`$regexp(%TRACK%,(.*)/.*,$1)`

Of course you could put the two steps in one Action Group and execute it from there.

---

<div class="post-metadata">

### Author: ![dolezvo1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@dolezvo1](https://community.mp3tag.de/u/dolezvo1)
#### Post date: [June 1, 2024, 11:44am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/5 "2024-06-01T11:44:46Z")

</div>

I see, that makes sense. Is there any way to trigger the renumbering from an action group as well?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 1, 2024, 11:46am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/6 "2024-06-01T11:46:55Z")

</div>

"to trigger" in a way like "execute the Action everytime the TRACK content changes"?

No, there is no such trigger.  
You would have to execute the Action Group manually.

I'm pretty sure that you already use some Actions for every album or whatever you load and modifiy.

Just add this two steps at the end of such an existing Action Group.

---

<div class="post-metadata">

### Author: ![dolezvo1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@dolezvo1](https://community.mp3tag.de/u/dolezvo1)
#### Post date: [June 1, 2024, 11:50am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/7 "2024-06-01T11:50:00Z")

</div>

No, in a way like "when action group is triggered, _renumber selected tracks_, then do transforms on the tags as described above". I don't use any action groups at the moment, but I'm not sure if that's too relevant.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 1, 2024, 11:55am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/8 "2024-06-01T11:55:55Z")

</div>

The Action Group itself can't be triggered.

But you can add an Action to fill whatever you like into TRACK.  
If you just want to renumber the tracks you have selected from 01 to - let's say - 15 selected files, then you could use

Action type: Format value  
Field:  
`TRACK`

Format string:  
`$num(%_counter%,2)`

This would fill your TRACK for the selected song #1 with 01, for the selected song #2 with 02 and so on until song #15 with the TRACK content 15.

You could do that similar for TOTALTRACKS with  
`$num(%_total_files%,2)`

Both `%_counter%` and `%_total_files%` depends on the amount of manually selected files.

---

<div class="post-metadata">

### Author: ![dolezvo1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@dolezvo1](https://community.mp3tag.de/u/dolezvo1)
#### Post date: [June 1, 2024, 11:58am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/9 "2024-06-01T11:58:36Z")

</div>

That's brilliant, thank you so much!

---

<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: [July 1, 2024, 11:58am UTC](https://community.mp3tag.de/t/saving-total-count-of-tracks-into-a-separate-tag/64912/10 "2024-07-01T11:58:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
