# Autonumbering "tracknumber" reset counter for each "album"

**URL:** https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132
**Category:** Support
**Created:** [August 7, 2022, 1:19pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132 "2022-08-07T13:19:15Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 7, 2022, 1:19pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/1 "2022-08-07T13:19:15Z")

</div>

Hi friends

I have a specific requirement here.

My Indian music collection are CD rips. Majority of the cds have multiple movies (albums)  
I have ripped and tagged them to match the track number on the CDs

For example if the CD has 14 songs and under 2 different movies/albums, I have tagged them as follows. The first two digits represent the %track%

 ![image](https://community.mp3tag.de/uploads/default/original/2X/8/830064a425b768c34f50f7c324978123c439b843.png)

Unfortunatley, when I exported the folder into roon, it combined these two albums as one. A workaround to fix this is to number the track of each album separately as follows.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/7/7cdbc79a6e49ab62d33e4a97af44002f2dcf7e9d.png)

I can see that there is an option to to do this using an auto numbering wizard, however I will have to select the tracks of each album manually as reset counter is only for folder but not album.

I'm wondering if someone can hel me with a script to do this  
Thanks in advance

---

<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: [August 7, 2022, 2:14pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/2 "2022-08-07T14:14:28Z")

</div>

> [@navarannan](#):
>
> however I will have to select the tracks of each album manually as reset counter is only for folder but not album.

This is the only way to accomplish your goal.  
Mp3tag can not guess what tracks belongs to an album (even if you and I can "see" it, 😉  
Mp3tag will always change track after track. Therefore the Auto-numbering wizard only works with manually selected tracks.)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 7, 2022, 4:47pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/3 "2022-08-07T16:47:02Z")

</div>

If you have 2 albums in 1 folder - why not move the files into seperate folders first? The data for the album is there, so it should be possible to format value the \_FILENAME and then use the track numbering assistant.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 7, 2022, 11:44pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/4 "2022-08-07T23:44:40Z")

</div>

Hi @ohrenkino  
Yes that is a solution, but I would like to keep the files in the same folder as it represents the CD.  
I'm womdering if we can use loop() command to write a logic and create a text file and then convert text to tag.

Also if two cds have one movie in common it will get mixed up

I dont know how to use it but I see some articles to achive advanced things using loop() in google.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [August 8, 2022, 1:14am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/5 "2022-08-08T01:14:19Z")

</div>

> [@navarannan](#):
>
> Yes that is a solution, but I would like to keep the files in the same folder as it represents the CD.

I expect that under the existing CD folder you have, you can still have additional sub folders for each Movie/Album you are trying to handle?

> [@navarannan](#):
>
> Also if two cds have one movie in common it will get mixed up

This is usually where the AlbumArtist field can help. You can distinguish between two or more identical Movie/Album names when they have different AlbumArtists.

As an alternative if the Artist is actually the same, you can also consider using the Albumsort field that is hidden from view normally. Again this field can help to distinguish Albums that have common names. However there are less players that support this field, so check with your favourite player’s documentation before you go and make these changes.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 4:38am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/6 "2022-08-08T04:38:34Z")

</div>

> [@MotleyG](#):
>
> I expect that under the existing CD folder you have, you can still have additional sub folders for each Movie/Album you are trying to handle?

For some reason I just hate it ☹  
I really wish if a rest tracknumber for each album would have been available with mp3tag.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 8, 2022, 5:37am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/7 "2022-08-08T05:37:57Z")

</div>

> [@navarannan](#):
>
> Yes that is a solution, but I would like to keep the files in the same folder as it represents the CD.

It is up to you to find which way is better for you.  
After you have moved and numbered the tracks - what hinders you to move them back into 1 folder?  
MP3tag has the functions for that, so you can do it almost automatically.  
And to make it clear: it is the player that causes the problems as apparently it requires files from 1 album to be found in 1 folder (which is strange as most players either go by the tag data or the filename but hardly ever by the folder structure).

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 8, 2022, 5:38am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/8 "2022-08-08T05:38:59Z")

</div>

> [@navarannan](#):
>
> I really wish if a rest tracknumber for each album would have been available with mp3tag.

Well, who knows what the future will bring.  
Until you find that function you know now a way to achieve your goal.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 5:44am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/9 "2022-08-08T05:44:18Z")

</div>

> [@ohrenkino](#):
>
> After you have moved and numbered the tracks - what hinders you to move them back into 1 folder?  
> MP3tag has the functions for that, so you can do it almost automatically.

I see.If that is the best solution could you please help me in how to achieve this?

Say I have a folder(ABCD) which represents the CD which has 3 Albums (XXX,YYY,ZZZ)  
Can I split the tracks into separate folders XXX, YYY and ZZZ  
Then I do the auto numbering to reset track after each folder  
Once this is done move the tracks to origibal folder ABCD and delete XXX, YYY and ZZZ

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 8, 2022, 5:48am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/10 "2022-08-08T05:48:33Z")

</div>

> [@navarannan](#):
>
> Once this is done move the tracks to origibal folder ABCD and delete XXX, YYY and ZZZ

If you want to do it completely automatically, then save the name of the original folder in a user-defined field like  
%mypath% formatted with %\_folderpath%.

To distribute the files to new folders, use Converter\>Tag-Filename with  
Format string: `%album%\%_filename%`

To get them all back again into the original folder, use Converter\>Tag-Tag for \_DIRECTORY with an absolute path like  
Format string: `d:\mymusic\Soundtracks\ABCD`  
enter here the original path of the album or re-use the contents of %mypath% if you have saved it.  
This moves all selected files to the named folder and removes the extra folders that were created to renumber the files.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 6:13am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/11 "2022-08-08T06:13:54Z")

</div>

> [@ohrenkino](#):
>
> If you want to do it completely automatically, then save the name of the original folder in a user-defined field like  
> %mypath% formatted with %\_folderpath%.

Thanks so much @ohrenkino for the detailed steps.  
Could you please tall me how to save the name of the original folder in a user-defined field like  
%mypath% formatted with %\_folderpath%.

I tried , but looks like wrong method

 ![image](https://community.mp3tag.de/uploads/default/original/2X/2/23e432ba8dfc2548eda5a18def318108567cd53e.png)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 8, 2022, 7:13am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/12 "2022-08-08T07:13:54Z")

</div>

> [@navarannan](#):
>
> Could you please tall me how to save the name of the original folder in a user-defined field like  
> %mypath% formatted with %\_folderpath%.

Either, create an action of the type "Format value" for MYPATH (you have to type in that name)  
Format string: %\_folderpath%  
Or use the Converter\>Tag-Tag in the same way.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 7:55am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/13 "2022-08-08T07:55:56Z")

</div>

> [@ohrenkino](#):
>
> Either, create an action of the type "Format value" for MYPATH (you have to type in that name)  
> Format string: %\_folderpath%  
> Or use the Converter\>Tag-Tag in the same way.

Still not getting it, Apologies ☹  
Here are the steps I followed.  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/e/e1fc2ca5a57cf2015b9a338e500d962c68b9a2b8.png)

 ![image](https://community.mp3tag.de/uploads/default/original/2X/a/a2ed50eb5d06d94376092bff0f3ef2b170027a92.png)  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/f/f913e3d6a546781b61e3a2dff62cab86aafb981f.png)

What should I select in the "Field" field?

---

<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: [August 8, 2022, 8:03am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/14 "2022-08-08T08:03:27Z")

</div>

> [@navarannan](#):
>
> What should I select in the "Field" field?

You can't select a user defined field (Mp3tag doesn't know what custom field you like to fill).  
You have to type in `MYPATH` manually as Field name entry.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 8, 2022, 9:29am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/15 "2022-08-08T09:29:53Z")

</div>

> [@ohrenkino](#):
>
> MYPATH (you have to type in that name)

in the combobox for FIeld.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [August 8, 2022, 9:43am UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/16 "2022-08-08T09:43:37Z")

</div>

> [@navarannan](#):
>
> I really wish if a rest tracknumber for each album would have been available with mp3tag.

There is no concept of an Album within mp3tag, each file is treated as an individual title. The grouping structure for folders or Albums can be what you want it to be.

> [@navarannan](#):
>
> Say I have a folder(ABCD) which represents the CD which has 3 Albums (XXX,YYY,ZZZ)

This is really the root of the problem. It is quite uncommon for a single disc (or CD) to have more than one Album. So I can’t see that this will justify a change to the design of mp3tag’s track number wizard tool. Not for a single use case such as you have presented.

> [@navarannan](#):
>
> For some reason I just hate it ☹

This is really just folder structure. It has nothing to do with the tagging content, or even how media players will typically handle the files. Unless you only browse by folder of course.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 12:00pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/17 "2022-08-08T12:00:11Z")

</div>

> [@MotleyG](#):
>
> This is really the root of the problem. It is quite uncommon for a single disc (or CD) to have more than one Album. So I can’t see that this will justify a change to the design of mp3tag’s track number wizard tool. Not for a single use case such as you have presented.

I'm a native of India. Majority of Indian film music CDs(popularly known as Bollywood, evethough it represents only a minor sector of the vast regional languages film music) are released as combinations CDs. Each CD contains songs from two to three different movies. As opposed to English, majority are albums by artists.

Yeah, its strange 🙂

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 12:19pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/18 "2022-08-08T12:19:27Z")

</div>

> [@ohrenkino](#):
>
> in the combobox for FIeld.

Hi @ohrenkino amd @LyricsLover  
Thank you so much for your patience in replying to my stupi queries. I have finally got the solution with least possible minimal effort 🙂

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [August 8, 2022, 1:30pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/19 "2022-08-08T13:30:06Z")

</div>

> [@navarannan](#):
>
> Each CD contains songs from two to three different movies.

I don't doubt that there are many discs that follow the scenario you are describing. Even in western regions, there are countless compilation releases with different Artists. But the track list still runs in order starting at 1 and increasing to the final total count of the tracks on that disc. If you were to play this CD in any standard player, the track numbers would not reset to start back at 1 simply because of an artist change.

It seems you have found the work around to suit your preference now, so that is most important for your library.

---

<div class="post-metadata">

### Author: ![navarannan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/3da27b/32.png) [@navarannan](https://community.mp3tag.de/u/navarannan)
#### Post date: [August 8, 2022, 3:37pm UTC](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132/20 "2022-08-08T15:37:12Z")

</div>

> [@MotleyG](#):
>
> If you were to play this CD in any standard player, the track numbers would not reset to start back at 1 simply because of an artist change.

This is the pain I'm having with roon.  
If you tag the multi album disc (each movie/album belonging to a different composer/album artist) as it is ( track list still runs in order starting at 1 and increasing to the final total count of the tracks on that dis) roon combines them as one album with some weird logic to display one among the albums as the roon album and Varios artists or composer/albumartists separated by "/".  
Please see below

 ![image](https://community.mp3tag.de/uploads/default/original/2X/9/913c3a1a6a5d67f21c0346394283133cb100faf6.jpeg)  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/4/44736c71b78a98b8548398df29b32166201499da.jpeg)

[Next page](https://community.mp3tag.de/t/autonumbering-tracknumber-reset-counter-for-each-album/58132.md?page=2)
