# Tag to filename

**URL:** https://community.mp3tag.de/t/tag-to-filename/896
**Category:** Support
**Created:** [March 13, 2004, 12:20am UTC](https://community.mp3tag.de/t/tag-to-filename/896 "2004-03-13T00:20:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Fifer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/0ea827/32.png) [@Fifer](https://community.mp3tag.de/u/Fifer)
#### Post date: [March 13, 2004, 12:20am UTC](https://community.mp3tag.de/t/tag-to-filename/896/1 "2004-03-13T00:20:26Z")

</div>

I greatly enjoy your program, but occasionally get frustrated with my inability to do some things. I'm sure the problem is me, not the program!  
I wish to do two things when converting a tag to a filename.

1. Remove invalid characters automatically and replace them with a comma.  
To do this I have entered the following formatstring.  
$validate("%artist% - %album% - %track% - %title%", ",")  
This works well.
2. Convert any single digit track numbers to two digits by adding a leading zero.  
I can do this by using the formatstring  
%artist% - %album% - $num("%track%",2) - %title%

I want to do this in one step, so I tried to combine the ideas by doing this  
$validate("%artist% - %album% - $num("%track%",2) - %title%", ",")  
This does not work - I get a message saying that there are too many parameters.  
Why will this not work? Am I trying to do something impossible?  
Obviously, I can do what I want in a series of steps, but that is not what I prefer to do. It would be elegant to do it in one step.  
Any ideas??

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 13, 2004, 9:31am UTC](https://community.mp3tag.de/t/tag-to-filename/896/2 "2004-03-13T09:31:20Z")

</div>

Fifer,

you can use  
**$validate("%artist% - %album%", ",") - $num("%track%",2) - $validate("%title%", ",")**

Nesting of these functions is not possible at the moment.

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![Fifer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/0ea827/32.png) [@Fifer](https://community.mp3tag.de/u/Fifer)
#### Post date: [March 16, 2004, 5:00pm UTC](https://community.mp3tag.de/t/tag-to-filename/896/3 "2004-03-16T17:00:32Z")

</div>

Thanks - that worked! I would never have found that on my own. I learn new things about your program almost every day.

---

<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:19pm UTC](https://community.mp3tag.de/t/tag-to-filename/896/4 "2026-02-09T12:19:12Z")

</div>


