# Repeating track numbers

**URL:** https://community.mp3tag.de/t/repeating-track-numbers/13527
**Category:** Support
**Created:** [June 7, 2012, 1:33pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527 "2012-06-07T13:33:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JCSullivan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@JCSullivan](https://community.mp3tag.de/u/JCSullivan)
#### Post date: [June 7, 2012, 1:33pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/1 "2012-06-07T13:33:25Z")

</div>

First of all, THANKS for a nice piece of software which I've just this week discovered.

I've gone over a few pages of the previous threads but cannot find an answer specific to my situation so, if you don't mind I'll post a new one here.

I have a directory which contains several mp3 files from several CDs. The file name consists of CD##-xx.mp3 Where a CD01 will include Track 1 to x the next CD, CD02 will include the same track numbers. See image.

![](http://i98.photobucket.com/albums/l247/JCSullivan/MP3TAG/mp3tag01.gif)

I would like to remove "CD##" and renumber all tracks sequentially - can somebody please help with this. Please keep it simple as I am just starting out.

Thanks

Start edit  
I found a solution which is further down. The key here was to renumber ALL the tracks sequentially. Then deal with the title tag. My Nomad Jukebox wouldn't accept the files in one directory.

---

<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: [June 7, 2012, 2:36pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/2 "2012-06-07T14:36:01Z")

</div>

> [@JCSullivan](#):
>
> ... I would like to remove "CD##" and renumber all tracks sequentially ...

If you really want to do it, then do it ...  
... hm ...  
what do you want to do with the remaining part of the filename e. g. "-16"?

A rather simple method would be ... to trim specific characters at the left side of the filename string.  
$trimLeft(%\_filename%,'CD0123456789')

This would left over the filename remainders "-16", "-17" and so forth.  
This will immediately lead into bad circumstances, because of creating duplicate filenames.  
And obviously you will do not know how to help yourself out of the plethora of error messages you will get.

What is the purpose of your plan?  
Why do you want to destruct an already good looking sorting criterion?  
All tracks seem to be organized very well, according to their base media.  
Please explain.

Don't you know, filenames are "smoke and mirrors"?  
Better you concentrate your work on the tag-fields meta data.  
And at the very end of all work, you can rename the filenames.

DD.20120607.1834.CEST

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [June 7, 2012, 2:40pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/3 "2012-06-07T14:40:40Z")

</div>

> [@JCSullivan](#):
>
> I would like to remove "CD##" and renumber all tracks sequentially - can somebody please help with this. Please keep it simple as I am just starting out....

Press Alt+6 then use the following.

_Action type:_ **Format value**  
_Field:_ **\_FILENAME**  
_Formatstring:_ **$regexp(%\_filename%,'\[1\]+-',)**

You will end up with the \_FILENAME going from 'CD01-16' to '16' Is this the result you want?

* * *

1. ^-

---

<div class="post-metadata">

### Author: ![JCSullivan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@JCSullivan](https://community.mp3tag.de/u/JCSullivan)
#### Post date: [June 7, 2012, 3:11pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/4 "2012-06-07T15:11:15Z")

</div>

Did a little more searching and found the answer

```
$num(%_counter%,$len(%_total_files%))/$num(%_total_files%,$len(%_total_files%))

```

In this thread

[here](https://community.mp3tag.de/t/7746/3)

---

<div class="post-metadata">

### Author: ![JCSullivan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@JCSullivan](https://community.mp3tag.de/u/JCSullivan)
#### Post date: [June 7, 2012, 3:12pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/5 "2012-06-07T15:12:24Z")

</div>

> [@stevehero](#):
>
> Press Alt+6 then use the following.
> 
> _Action type:_ **Format value**  
> _Field:_ **\_FILENAME**  
> _Formatstring:_ **$regexp(%\_filename%,'\[1\]+-',)**
> 
> You will end up with the \_FILENAME going from 'CD01-16' to '16' Is this the result you want?

Thanks, I'll be checking that one out as well.

* * *

1. ^-

---

<div class="post-metadata">

### Author: ![JCSullivan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@JCSullivan](https://community.mp3tag.de/u/JCSullivan)
#### Post date: [June 7, 2012, 3:14pm UTC](https://community.mp3tag.de/t/repeating-track-numbers/13527/6 "2012-06-07T15:14:31Z")

</div>

> [@DetlevD](#):
>
> If you really want to do it, then do it ...  
> ... hm ...  
> what do you want to do with the remaining part of the filename e. g. "-16"?
> 
> A rather simple method would be ... to trim specific characters at the left side of the filename string.  
> $trimLeft(%\_filename%,'CD0123456789')
> 
> This would left over the filename remainders "-16", "-17" and so forth.  
> This will immediately lead into bad circumstances, because of creating duplicate filenames.  
> And obviously you will do not know how to help yourself out of the plethora of error messages you will get.
> 
> What is the purpose of your plan?  
> Why do you want to destruct an already good looking sorting criterion?  
> All tracks seem to be organized very well, according to their base media.  
> Please explain.
> 
> Don't you know, filenames are "smoke and mirrors"?  
> Better you concentrate your work on the tag-fields meta data.  
> And at the very end of all work, you can rename the filenames.
> 
> DD.20120607.1834.CEST

I needed to make the tracks sequential - I found a solution elsewhere but, this will ALL help when I need to rename the titles.

---

<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/repeating-track-numbers/13527/7 "2026-02-09T12:23:53Z")

</div>


