# Remove leading zeros

**URL:** https://community.mp3tag.de/t/remove-leading-zeros/14154
**Category:** Support
**Created:** [November 21, 2012, 10:21pm UTC](https://community.mp3tag.de/t/remove-leading-zeros/14154 "2012-11-21T22:21:58Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [November 21, 2012, 11:56pm UTC](https://community.mp3tag.de/t/remove-leading-zeros/14154/7 "2012-11-21T23:56:57Z")

</div>

> [@Rich Pasco](#):
>
> Would you please show me exactly how this would look in a filename to tag conversion?  
> I can't get it to parse any file names with this.

You can't use a function in a converter. Generally, you would first parse the name and end up with 01, 02, etc. in the TRACK field. Then you would apply the function to clean up the TRACK field using an action. After using the Filename-Tag converter you could use a Format value action in either a saved Action group or through an _Action (Quick)_:

_Action type:_ **Format value**  
_Field:_ **TRACK**  
_Format string:_ **$fmtNum(%track%)**

OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

If you had file names that looked something like:

01 - Ornithology  
02 - Scrapple from the Apple  
03 - Parker's Mood

then you could use the following format string in the Filename-Tag converter to remove the leading zeros, but it would only work on tracks 1 through 9

0%track% - %title%

You would need to use the following format string for tracks 10+:

%track% - %title%

This would work, but IMO it's not worth the trouble of having to select different ranges of tracks, changing the format string and doing two conversions.

---

_[View the full topic](https://community.mp3tag.de/t/remove-leading-zeros/14154)._
