Feature Request - Charactor Substitution for Filenames for Invalid Charactors


I have looked everywhere for this option (and its about the only thing that annoys me about MP3TAG in the last few years I've been using it)..

Basically in things like EAC there is a substitution menu where the user can specify what charactors to use to replace certain invalid charactors when converting tag's to filenames.. This would be very very useful in MP3TAG..

As an example.. If I have a song with 2 artists it would be tagged as ARTIST1/ARTIST2 in the artist field (which is my preference as WMP understands this and seperates it out.. as well as my in car player)

If I then do Tag -> filename and use the Artist field it will just put it in as:

  1. ARTIST1ARTIST2 - TRACK.MP3 (as an example)

Because the / is an illegal charactor in windows filenames it just misses it out and puts the two artists after each other without even a space, what I would like to happen is to be able to set an automatic replace to replace / with ', ' (comma space) on conversion.. this would mean it would have tagged the file:


This would be configurable so that you can choose which to replace and with what. As a starting point the defaults in EAC would be good as defaults in mp3tag:

Replace " with '' (2 single quotes)
Replace \ with -
Replace / with ,
Replace : with -
replace * with x
replace ? with a space
replace < with [
replace > with ]
replace ¦ with !

I have attached a screenshot of the relevant configuration screen in EAC to show what i mean, and how simple this could be.

If this is aready possible I apologise, but ive looked many times and never seen the option.


Also I realise this can perhaps be done using a custom action.. but it would be a very useful feature to have in the main application especially as it is something that would affect everyone.. No one can use those charactors (on windows at least).. so people must come across this quite often, which is why i feel it deserves to be a feature, not just some method for doing it with a script (which ive never got to work anyway)

After posting this I went on a much further search by just browsing random threads and found this: How Do I replace ? and / with _

Which works, although its no where near as graceful as EAC's method outlined above.

Validate() only replaces ALL invalids with the SAME charactor.. which isnt ideal.. So i would still love to see this feature as it would help many people a lot if this was automatic!

I also feel as mentioned above that this should be a core feature since its not optional.. you cannot use those charactors.. so the software should automatically replace them with something sensible, without the user needing too add a validate each time.

Heres hoping someone agrees and theres enough interest to get this as a new feature.

Thanks for the great app even if it doesnt make it :slight_smile:

I guess it could be a good feature.

For now you can use
$replace(%title%,",'''',,-,/,',',:,-,*,x,?, ,<,'[',>,']',|,!)

Thanks dano, that is awesome.

Still think it would be better if it was automatic.. but I have saved a copy of this for pasting in in future.


I also wish this feature to be added to mp3tag, it's not much work I think and could be really useful.

Thanks for this great software!

What puzzles me about this thread: what about the $validate function?
Doesn't that remove all the illegal characters?
I always thought that it had the benefit that I did not have to modify the tag data as it can be applied to the filename generation only.
So, in a way, the function is already there, I thought.