# Dealing With Zeros in Filenames

**URL:** https://community.mp3tag.de/t/dealing-with-zeros-in-filenames/70777
**Category:** Mac
**Created:** [February 26, 2026, 10:31pm UTC](https://community.mp3tag.de/t/dealing-with-zeros-in-filenames/70777 "2026-02-26T22:31:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ms6676749](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@ms6676749](https://community.mp3tag.de/u/ms6676749)
#### Post date: [February 27, 2026, 1:33am UTC](https://community.mp3tag.de/t/dealing-with-zeros-in-filenames/70777/2 "2026-02-27T01:33:26Z")

</div>

M4A tag spec stores %track% as integers not strings like MP3/FLAC, so leading zeros are not possible if that’s the file you are working with.

> [@Leading zeros are not possible with automatic and manual track numbering](https://community.mp3tag.de/t/leading-zeros-are-not-possible-with-automatic-and-manual-track-numbering/66532/3):
>
> It's unfortunately not possible with the MP4/M4A format. Track numbers are stored as integer values there (basically a number) in the file instead of a numeric string (like "01") as with MP3 or FLAC. If you want to use leading zeros when renaming files, you can always use $num(%track%,2) instead of %track%

If you want to do tag → filename, you can try: `$iflonger(%track%,1,%track%,$num(%track%,2))`

Basically, if the %track% length is longer than 1 (e.g., two digits), then %track% will be used, if %track% is 1 digit, then a leading zero will be prepended to %track% in the filename.

---

_[View the full topic](https://community.mp3tag.de/t/dealing-with-zeros-in-filenames/70777)._
