Character replacement for Tag—Filename?

EAC can do this: Replace unsupported characters for filename creation. Surely, this is already part of MP3Tag, and I just can't find it?

I have any number of song titles with characters that cannot be used in a file name (colon, semicolon, double quotes, question marks, and more. In my case, EAC converts these to a circumflex (^) when creating file names from metadata found online. I subsequently use those file names are used to populate tags in MP3Tag. The tags are then used to simplify long file names for my music library (I use %artist% - %title%).

For a variety of reasons, I often find myself having to manually reinsert that circumflex into file names, as it gets lost when special characters are present in the %title% field of my tags. This is a hassle.

MP3Tag can selectively replace unsupported characters when creating file names from tags, can it not?

Have a look at the scripting functions and especially $validate() and $replace().

$validate() can be used to replace any invalid character in filename-building with 1 defined character.
$replace can be used to replace any invalid invidual character with defined characters.

i.e
$validate(%artist% - %title%,^)
$replace(%artist% - %title%,:, -, *,+ ..... pairs of unvalid characters and characters that should replace them seperated by a comma)

Seems the sort of thing that should be coded into the UI.

I appreciate the link, but it just provides a list of commands. I've no idea how to implement scripting for MP3Tag.

Even without these special functions you will get only valid filenames.
These functions are available for those who require a special treatment.
And if you create a corresponding action then you have it in the UI.

Please don't shy away from the word "scripting".

You are already using "scripting" because you are obviously working with the converter and the format string %artist% - %title%.
Then why should it be difficult to take my 1st example and instead of your format string
%artist% - %title%
simply write
$validate(%artist% - %title%,^)
and you already have the result that your software EAC has also written so far.

With the variant $replace() you are able (if you want) to act a little more individually and not replace every invalid character with the same character but use an individual character for replacement in each case.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.