# How do I put leading 0 into filename (1-9)

**URL:** https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929
**Category:** Support
**Created:** [June 9, 2008, 4:40pm UTC](https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929 "2008-06-09T16:40:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chrislascelles](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/f05b48/32.png) [@chrislascelles](https://community.mp3tag.de/u/chrislascelles)
#### Post date: [June 9, 2008, 4:40pm UTC](https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929/1 "2008-06-09T16:40:28Z")

</div>

Dear Mp3tag friends,

I love Mp3tag!

I need to know how to put a leading "0" in the filename numbers. For example, to convert "Chapter 1.mp3" into "Chapter 01.mp3".

In my situation, I cannot use the Track Number as the source of the number for the filename.

Many thanks for your help!

Best regards,  
Chris Lascelles

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [June 9, 2008, 7:32pm UTC](https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929/2 "2008-06-09T19:32:18Z")

</div>

Does this work?

_Action type:_ **Replace with regular expression**  
_Field:_ **\_FILENAME**  
_Regular expression:_ **(\s)(\d)(..\*)**  
_Replace matches with:_ **$1$num($2,2)$3**

[] case-sensitive comparison

---

<div class="post-metadata">

### Author: ![chrislascelles](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/f05b48/32.png) [@chrislascelles](https://community.mp3tag.de/u/chrislascelles)
#### Post date: [June 9, 2008, 8:02pm UTC](https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929/3 "2008-06-09T20:02:54Z")

</div>

Hey Sebastian,

It works perfectly! Thank you so much!!!

Best regards,  
Chris Lascelles

---

<div class="post-metadata">

### Author: ![Marcabove](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/3d9bf3/32.png) [@Marcabove](https://community.mp3tag.de/u/Marcabove)
#### Post date: [June 28, 2008, 1:45pm UTC](https://community.mp3tag.de/t/how-do-i-put-leading-0-into-filename-1-9/6929/4 "2008-06-28T13:45:16Z")

</div>

A simple way to do that is Tag - Filename change the "%track%" to "$num(%track%,2)". Know you can change it in the same step as you create the file name. There also the autonumbering wizard that will do this.

Marc

---

<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/how-do-i-put-leading-0-into-filename-1-9/6929/5 "2026-02-09T12:21:00Z")

</div>


