# How could I automate adding album number to Title?

**URL:** https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205
**Category:** Support
**Created:** [April 15, 2025, 4:43pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205 "2025-04-15T16:43:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cshooshan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cshooshan](https://community.mp3tag.de/u/cshooshan)
#### Post date: [April 15, 2025, 4:43pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205/1 "2025-04-15T16:43:35Z")

</div>

Background: The only way I can play albums sequentially in my Hyundai is if the track titles are unique to each album and sequential numerically. It's ugly but I keep a backup USB drive just for this purpose. This behavior is not affected by filename. I manually edited a USB drive with 26 albums to test it.

Let's take excerpts from two albums as an example ...

Four tracks from ABBA [Album: Gold (Greatest Hits)]:  
Dancing Queen  
Knowing Me, Knowing You  
Take A Chance On Me  
Mamma Mia

Four tracks from Kesha [Album: Rainbow]  
Bastards  
Let 'Em Talk  
Woman  
Hymn

If I number these tracks in their Title field this way (where the ABBA album is the first album listed and the Kesha album is the fifteen album and these are the first four tracks of each):

0101 Dancing Queen  
0102 Knowing Me, Knowing You  
0103 Take A Chance On Me  
0104 Mamma Mia  
1501 Bastards  
1502 Let 'Em Talk  
1503 Woman  
1504 Hymn

When I select the two albums in the vehicle, these albums play whole albums at a time and in track order. Any other Title naming scheme either plays all Track 1s first or plays the tracks in  
alphabetical order by actual track name (if I use hyphens between album number and track number, the album number is ignored).

In the short-term, what I am looking to do is whenever I add a new album, I can rename (renumber) all of the tracks to keep the Artist alpha order for albums.

Example: I want to add a 27th album between One Republic and Pink from Pet Shop Boys. In the sequence it would be the new 14th album so its tracks would be numbered 1401, 1402, 1403, etc., and then every other album would have its tracks renamed -- Pink would be numbered 1501, 1502, 1503, etc., and the former 26th album would be numbered 2701, 2702, 2703, etc.

Any ideas for this scenario or the global issue of how to renumber a brand new set of albums that have two digit track numbers but need those to be prepended with a two digit album number?

Thanks,  
Charlie

---

<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: [April 15, 2025, 4:59pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205/2 "2025-04-15T16:59:44Z")

</div>

Copy, if there is one the DISCNUMBER to a user-defined field, e.g. orig\_discnumber.  
Update the DISCNUMBER with the track numbering wizard Ctrl-K to update the discnumber when the album changes.  
Use Convert\>Tag-Tag for TITLE  
Format string: `$num(%discnumber%,2)$num(%track%,2) - $regexp(%title%,\d+ (.*),$1)`

---

<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: [April 15, 2025, 4:59pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205/3 "2025-04-15T16:59:50Z")

</div>

> [@cshooshan](#):
>
> Any ideas for this scenario or the global issue of how to renumber a brand new set of albums that have two digit track numbers but need those to be prepended with a two digit album number?

I don't see a really automated way.

What you can do:  
You can rename your files from - let's say -  
01 Dancing Queen  
to  
0101 Dancing Queen  
this way:

1. Load the Album from ABBA into Mp3tag
2. Sort the tracks by tracknumber to see  
01 Dancing Queen  
02 Knowing Me, Knowing You  
03 Take A Chance On Me  
04 Mamma Mia
3. Select all tracks from your album
4. Use the Convert Tag -\> Tag for `_FILENAME` and use a Format string like this  
`01%_FILENAME%`  
Replace the number `01` with the number your tracks should become as "prefix"

In your added Example you would set `15` as "prefix" for tracks from P!nk.

---

<div class="post-metadata">

### Author: ![cshooshan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cshooshan](https://community.mp3tag.de/u/cshooshan)
#### Post date: [April 15, 2025, 7:40pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205/4 "2025-04-15T19:40:38Z")

</div>

Yes, thank you, that seems like a good solution. My original 26 album test USB has just two classical albums that have a second disc -- I do not restart track numbering with the second disc so the discnumber field (with a "2" for these albums) is nice to have for historical reasons but is otherwise unused. It is easy enough to migrate those entries to a user-defined field. Nice!

---

<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: [May 15, 2025, 7:41pm UTC](https://community.mp3tag.de/t/how-could-i-automate-adding-album-number-to-title/68205/5 "2025-05-15T19:41:14Z")

</div>

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