"/" character from artist field is removed in filename

Hello,

In Artist field new character is using "/", the problem is, that when I use "tag to filename" feature, it's removed completely, so multiple artist names are merged, it's unusable this way.

I know "/" can't be used in filename, I know I can convert that character manually, but I don't want to do it manually every time, that's why I'm using mp3tag, to automatize the process.

If it possible to automatically replace invalid character with another in the current version? So, that I'd set some option once and it will be converting automatically.

If not, could you add such option, please?

It could be for any invalid character, customizable, e.g.:

"?" > ""
"/" > ", "

Just updated to v3.04a, Windows 10 2004 64-bit.

If you want to have a customized list of replacements then enclose the format string that you use to name files in a $replace() function.
E.g.
$replace($num(%track%,2) - %artist% - %title%,'/',',',?,)

Thanks, it could be a workaround, but I'm not using replacements every time, so if I forget, some filenames will be broken.

I think it will be a problem, because more people started using such weird characters in ID3 tags.

Yes, true.
Still: filenames have many more invalid characters that may still be perfectly valid for tag fields. So it is fairly likely that filenames and the contents of tag fields will differ.
If you don't want to forget your replacements, do not use ad hoc the function Convert>Tag-Filename but create an action of the type "Format value" for _FILENAME. This would work just like the automatism you were looking for.
Most things that should be automized are covered by actions.

Although this can be realized via actions or custom replacements, I think this is a valid feature request.

I was thinking about this lately and think that it will greatly simplify some format strings. Basically, it would be a list of custom character replacements, configurable via options, that would be used with each file renaming (after all scripting functions and placeholders are evaluated).

What do you think?

If there should be a list of characters that will be treated in a special way when writing a filename, then I would like to see that list not only in the options dialogue but also in the place where I configure the filename.
It would be rather awkward to set up a format string in e.g. Convert>Tag-Filename and then see that the preview (which I assume would reflect that treatment) is somewhat not like what I want it to be as there is also the replacement list.
In this case it would be not very convenient to close the Converter, open the Options dialogue, set the replacements and then return to the Converter.
I would like to see some kind of "Expand" button in the Converter dialogue which would then reveal the replacement configuration, so that this could be edited for the current renaming process.
The configuration for replacements should also be addressable (to be opened) in options.
I envision the configuration itself to be a list with source and replacement and a checkbox for each line in the list so that one could enable and disable quickly if some characters should not be used temporarily but should be kept so that they can be activated later again.
It would be nice if the list could be filled by default with some characters that would lead to invalid filenames and that could not be removed, only the replacement could be edited - perhaps the default entries in the list could be adapted depending on whether MP3tag runs on Windows or on a Mac.
It would make the filenaming more transparent.
I don't know though, how one could reflect this for "Format value" actions with the target _FILENAME.
Example:
table

Thanks, it would be nice.

If it's a problem for someone, it could be disabled by default.

Perhaps that option could be also in dialogs like "Tag - Filename", so it would be possible to enable/disable it quickly just for one time, if needed.

If my vote counts somehow, please strongly consider it.
A list of invalid filename characters and their "escaped" match would be needed.
I had this thought several years ago but didn't think it would ever be considered so didn't bother (several requests I had didn't go well or it took very long time they were fulfilled).
Maybe a pair of functions $encode() / $decode() could be created? Both functions will use the pairs declared in options.

Please make it possible to disable this if implemented.

I have already setup character replacement within my Action groups (back and forth). It's designed for my workflow and takes care of some special cases, so I wouldn't wanna change it.

If such a list is customisable, then I think that it should not interfere with existing actions. Either you set the character that the actions use already or you switch off the character that should be left untouched and then be treated by your actions.
The question is also: does this new feature treat the filename before a user-action sets in or always as the final step before writing the filename.

Today I had time to have a closer look at my actions, and realized that I have no reason to worry. Because my actions don't write directly from e.g. %title% to %_filename% but make use of a temporary, intermediate field which is prepared without illegal characters, the settings of the new feature won't matter.

Other users could be affected though, if they've setup a Format value with field _FILENAME and string $replace(%title%,?,¿). Sure, they could setup the same replacement in the new customizable list, but what happens if they forget about it and the two settings differ? Which one would take precedence? Or, if there is a default setting and the user don't realize the new feature when updating? That could be dismissed as user error of course, but it might be better to have an off setting or even off as default. Just some thoughts.

I don't think that this would interfere with anything. If I'm missing something, please let me know.

You are right of course, and I didn't read properly the first time. My apologies for not paying attention.

1 Like