# cleaning track numbers

**URL:** https://community.mp3tag.de/t/cleaning-track-numbers/7065
**Category:** Support
**Created:** [July 22, 2008, 11:49pm UTC](https://community.mp3tag.de/t/cleaning-track-numbers/7065 "2008-07-22T23:49:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![madivad](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@madivad](https://community.mp3tag.de/u/madivad)
#### Post date: [July 22, 2008, 11:49pm UTC](https://community.mp3tag.de/t/cleaning-track-numbers/7065/1 "2008-07-22T23:49:08Z")

</div>

I have a heap of track numbers that include the total tracks in the track field.

eg, some tracks are simple 1, 2, 3, 4... others are 1/12, 2/12, 3/12, 4/12...

I want to remove them and populate it with simply the track number and move the total number of tracks to the total tracks field, but I don't know how to do this

For the first part I tried creating an action that formatted a field based on TRACK, but it returns a blank whether there is a "/" or not, can anyone see what it is I am doing wrong?

**$if($strchr(%track%,"/"),$left(%track%,$strchr(%track%,"/")-1),%track%)**

Thanks in advance

---

<div class="post-metadata">

### Author: ![madivad](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@madivad](https://community.mp3tag.de/u/madivad)
#### Post date: [July 23, 2008, 12:19am UTC](https://community.mp3tag.de/t/cleaning-track-numbers/7065/2 "2008-07-23T00:19:07Z")

</div>

and I just found a similar thread, so I used the solution from

[Rename from tag (fractional track numbers)](https://community.mp3tag.de/t/7047/2)

to simply: **$num(%track%,1)** and the trailing part is stripped...

---

<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:21pm UTC](https://community.mp3tag.de/t/cleaning-track-numbers/7065/3 "2026-02-09T12:21:03Z")

</div>


