# Tag - Filename format string help

**URL:** https://community.mp3tag.de/t/tag-filename-format-string-help/13849
**Category:** Support
**Created:** [September 7, 2012, 12:23pm UTC](https://community.mp3tag.de/t/tag-filename-format-string-help/13849 "2012-09-07T12:23:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Parnodna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@Parnodna](https://community.mp3tag.de/u/Parnodna)
#### Post date: [September 7, 2012, 12:23pm UTC](https://community.mp3tag.de/t/tag-filename-format-string-help/13849/1 "2012-09-07T12:23:22Z")

</div>

Hi, just discovered this great tool earlier today.

I am trying to come up with a format string for Tag - Filename, but being a bit slow I can't figure out exactly how to do what I want.

Basically, what I want is for the filename to be 01 Blabla.mp3 if there is no discnumber, but if there is for example discnumber 1 tag I want the filename to be 101 Blabla.mp3.

What I've got so far is

$num(%discnumber%,)$num(%track%,2) %title%

Now I am guessing I have to use the if(x,y,z) and maybe some other functions, but I can't quite figure out how!

Any help would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [September 7, 2012, 1:08pm UTC](https://community.mp3tag.de/t/tag-filename-format-string-help/13849/2 "2012-09-07T13:08:56Z")

</div>

[$num(%discnumber%,1)]$num(%track%,2) %title%

---

<div class="post-metadata">

### Author: ![Parnodna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@Parnodna](https://community.mp3tag.de/u/Parnodna)
#### Post date: [September 7, 2012, 1:14pm UTC](https://community.mp3tag.de/t/tag-filename-format-string-help/13849/3 "2012-09-07T13:14:24Z")

</div>

Thanks, worked like a charm!

---

<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:24pm UTC](https://community.mp3tag.de/t/tag-filename-format-string-help/13849/4 "2026-02-09T12:24:02Z")

</div>


