# \[X\] Problem with leading zeros in the TRACK tag

**URL:** https://community.mp3tag.de/t/x-problem-with-leading-zeros-in-the-track-tag/12964
**Category:** No Bugs
**Created:** [January 20, 2012, 12:07am UTC](https://community.mp3tag.de/t/x-problem-with-leading-zeros-in-the-track-tag/12964 "2012-01-20T00:07:59Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![LikeYourStyle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/91b2a8/32.png) [@LikeYourStyle](https://community.mp3tag.de/u/LikeYourStyle)
#### Post date: [January 20, 2012, 12:28pm UTC](https://community.mp3tag.de/t/x-problem-with-leading-zeros-in-the-track-tag/12964/3 "2012-01-20T12:28:54Z")

</div>

> [@DetlevD](#):
>
> ...
> 
> The problem seems not related to Mp3tag but to other software on the target system.  
> Numbers resp. number strings (!), which contain only digits from 0 to 7 and begin with 0, are interpreted as octal numbers by the other software.
> 
> ...
> 
> do you mean leading blanks or leading zeros?
> 
> Are you aware of the Mp3tag scripting functions?  
> The $num(,) may be of help to format a number as needed.
> 
> DD.20120120.0552.CET

Thanks DetLevD.

I did of course mean strip leading _zeros_. I have now had a look at the scripting functions. Unfortunately, they are not available when converting filenames to tags. However, I have worked out an easy solution to my problem:

My filenames have the format

aaa - bbb .nnn.ccc  
where aaa = artist, bbb = album, nnn = track, ccc = title

I was using the transformation  
%artist% - %album% .%track%.%title%

This was producing a 3 digit track with leading zeros and Windows explorer was misinterpreting most numbers between 010 to 077 as hex (as you said).

The simple solution was to set up a new transformation for use with numbers 010 to 099.  
%artist% - %album% . **0** %track%.%title%

This transformation generates 2 digit track numbers by ignoring the leading zero and so avoids the problem with Hex numbers (which I have also seen in some Android apps).

---

_[View the full topic](https://community.mp3tag.de/t/x-problem-with-leading-zeros-in-the-track-tag/12964)._
