# Need Help With Action To Convert Track Formats

**URL:** https://community.mp3tag.de/t/need-help-with-action-to-convert-track-formats/14999
**Category:** General Discussion
**Created:** [August 30, 2013, 7:55pm UTC](https://community.mp3tag.de/t/need-help-with-action-to-convert-track-formats/14999 "2013-08-30T19:55:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jeteroll](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@Jeteroll](https://community.mp3tag.de/u/Jeteroll)
#### Post date: [August 30, 2013, 7:55pm UTC](https://community.mp3tag.de/t/need-help-with-action-to-convert-track-formats/14999/1 "2013-08-30T19:55:30Z")

</div>

Hello all! I have the following action which I would like to preform on my music:

```
$if(%track%,C:\Users\Joe\Desktop\Music\\%artist%\\%album%\\%track% - %title%,C:\Users\Joe\Desktop\Music\\%artist%\\%album%\\%title%)

```

However, I need to do the following two things first while leaving the track fields of songs with blank track fields blank.

I would like to take out any leading zeros in the track data. For example, I would want to change "03" to just "3".

Additionally, I would like to convert all the track data stored in the format of "number/total track number" to just "number". For example I would want to change "7/14" to "7".

I have spent an hour or two trying to figure this out and I simply can't. Would anyone be kind enough to help me out? Any help is appreciated!😃

---

<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 30, 2013, 8:02pm UTC](https://community.mp3tag.de/t/need-help-with-action-to-convert-track-formats/14999/2 "2013-08-30T20:02:23Z")

</div>

If you want to re-write the filename, use  
Convert\>Tage-Filename  
To limit the track number to just digits without padding use  
$num(%track%,1)  
This cuts out the "x of y" as well.
