# Remove question marks and convert illegal characters when renaming from tags

**URL:** <https://community.mp3tag.de/t/remove-question-marks-and-convert-illegal-characters-when-renaming-from-tags/50104>\
**Category:** Support\
**Created:** [September 3, 2020, 2:12am UTC](https://community.mp3tag.de/t/remove-question-marks-and-convert-illegal-characters-when-renaming-from-tags/50104 "2020-09-03T02:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttappe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/ea666f/32.png) [@ttappe](https://community.mp3tag.de/u/ttappe)\
**Post date:** [September 3, 2020, 2:12am UTC](https://community.mp3tag.de/t/remove-question-marks-and-convert-illegal-characters-when-renaming-from-tags/50104/1 "2020-09-03T02:12:30Z")

</div>

Hello, I am a new user to MP3tag, but I must say I really like it. Here is my problem or what I want to do. It's about tag to filename converter. I would like to eliminate question marks and convert all other illegal characters to a dash. That's it! I would use $validate, except I don't want dashes in my filenames where there are ? in my tags. How can I replace ? with nothing and then replace all other illegal chars with just a dash?  
Thanks in advance, Tom.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [September 3, 2020, 5:48am UTC](https://community.mp3tag.de/t/remove-question-marks-and-convert-illegal-characters-when-renaming-from-tags/50104/2 "2020-09-03T05:48:11Z")

</div>

you could use nested scripting functions:  
`$validate($replace(%my_field_list%,?),-)`  
the $replace() takes care of the ? and $validate() takes care of all the other characters.  
And while you are at it: perhaps you want to replace the / and \ as well - as this sometimes leads to the unexpected creation of sub-directories but as these are valid characters for paths, they do not get caught by $validate().  
So:  
`$validate($replace(%my_field_list%,?,/,\,),-)`

---

<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:28pm UTC](https://community.mp3tag.de/t/remove-question-marks-and-convert-illegal-characters-when-renaming-from-tags/50104/3 "2026-02-09T12:28:48Z")

</div>


