# Manipulating Track Number

**URL:** https://community.mp3tag.de/t/manipulating-track-number/10596
**Category:** Support
**Created:** [June 27, 2010, 1:29pm UTC](https://community.mp3tag.de/t/manipulating-track-number/10596 "2010-06-27T13:29:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Drazick](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@Drazick](https://community.mp3tag.de/u/Drazick)
#### Post date: [June 27, 2010, 1:29pm UTC](https://community.mp3tag.de/t/manipulating-track-number/10596/1 "2010-06-27T13:29:24Z")

</div>

Hello.  
I have a list of MP3's with their respective Track number.

I want to add 5 to each track number.

I tried:  
Convert -\> Actions -\> New Action

I chose "Replace".  
I chose:  
Field - "TRACK".  
Original - That's the tricky one, What should I chose? It's different each time. Tried %track%.  
Replace With - $add(%track%, 5).

Yet it didn't work.  
Any advise?  
Thanks.

---

<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 27, 2010, 2:15pm UTC](https://community.mp3tag.de/t/manipulating-track-number/10596/2 "2010-06-27T14:15:57Z")

</div>

> [@Drazick](#):
>
> ... I want to add 5 to each track number. ...

If this need is a one time shot, then use the **Tracknumber Assistant [Ctrl+K]**.

If you need such renumbering every now and then, then you can define an action, which does the math and set the tag field.  
Action: **Format value**  
Tag field: **TRACK**  
Format string: **$add(%TRACK%,5)**

By the way ... the $replace() function respectively the action "Replace" is designed for textual replacement within a text string.  
To "replace" the content of a tag field use the action "Format value".

DD.20100627.1820.CEST

---

<div class="post-metadata">

### Author: ![Drazick](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@Drazick](https://community.mp3tag.de/u/Drazick)
#### Post date: [June 27, 2010, 8:02pm UTC](https://community.mp3tag.de/t/manipulating-track-number/10596/3 "2010-06-27T20:02:23Z")

</div>

Thanks, Worked Perfectly.  
Though I didn't get why "Replace" wouldn't work.

Is there a way to read the %track% as text an manipulate it using replace?

---

<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 28, 2010, 1:43am UTC](https://community.mp3tag.de/t/manipulating-track-number/10596/4 "2010-06-28T01:43:46Z")

</div>

> [@Drazick](#):
>
> Thanks, Worked Perfectly.  
> Though I didn't get why "Replace" wouldn't work. Is there a way to read the %track% as text an manipulate it using replace?

You can use the action "Format value" along with the function $replace(string,from,to):  
Action: **Format value**  
Tag field: **TRACK**  
Format string: **$replace(%TRACK%,%TRACK%,$add(%TRACK%,5))**

The action "Replace" does not support tag field placeholders for the parameters  
"Original" and "Replace with". Both parameters seems to be allowed to be literals only.

The action "Replace with Regular Expression" might do the trick.  
Action: **"Replace with Regular Expression"**  
Tag field: **TRACK**  
Regular expression: **^\d+**  
Replace matches with: **$add($0,5)**

DD.20100617.0543.CEST

---

<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:22pm UTC](https://community.mp3tag.de/t/manipulating-track-number/10596/5 "2026-02-09T12:22:28Z")

</div>


