Problem with %tags% in a filenaming script


I’m having a problem with tags in a file naming script. Pretty much any dereference of a tag gets ‘/’ replaced with ‘_’. Is there a way of turning this off?

For example using this track: Recording “LA Drone / Immigrant Song” by Led Zeppelin - MusicBrainz

We have %title% and %catalognumber% both with a ‘/’ in them. If I want to replace them with U+2215 ‘∕’ using $replace(%title%,/,∕) it doesn’t work as %title% comes back pre-filtered to ‘_’.

A more complete example would be

$if(%catalognumber%, [$replace($replace($getmulti(%catalognumber%,0),_,∕),\\,∖)])

Is there a mode switch I can flip to bypass this behavior?

Even better would be a global filter I could set for ALL tag dereferencing :grinning:
It would look something like this


What characters are forbidden in Windows and Linux directory names?

there is a plugin called “Replace Forbidden Symbols”, you can find it under Options → Options… → Plugins. the description:

Replaces Windows forbidden symbols: :, /, *, ?, ", ., | etc. with a similar UNICODE version. Currently replaces characters on “album”, “artist”, “title”, “albumartist”, “releasetype”, “label” tags. Also add $replace_forbidden() function for Tagger. Example: $set(composer,$script_forbidden(%composer%))

I haven’t personally used it myself, so I don’t know how exactly it works, tho~


Do the replacements already on load in a tagger script (Options > Scripting). If you don’t want the replacement being done to your tags use a different variable name. E.g.


Then in your naming script use %_title%


Thank you. It seems to work first off without any work on my part at all. The ‘global filter’ I requested :wink:

This doesn’t work, so I’ll follow your advice on a tagger script for doing replacements

$if(%catalognumber%, [$getmulti($replace_forbidden(%catalognumber%),0)])

Ok, got it. Thank you both for the help. It seems to be a global rule in a filenaming script that dereferencing any tag applies the rule of replacing a forward slash with an underscore. But adding more tags not covered by the ‘replace forbidden symbols’ plugin does the trick

Extend 'Replace Forbidden Symbols' plugin to incude everything I would need

Oh, I’m kinda slow, but I just realized plugins are non-compiled script in text form. Now I’m having fun

davygrvy@puukukui:~/Documents$ diff
<     "/": "⁄",
>     "/": "∕",
<     "?": "?",
>     "?": "ʔ",
<     '<': '‹',
<     '>': '›'
>     '<': '◀',
>     '>': '▶'
>     "catalognumber",
>     "_releasegroup",
>     "_releasecomment",
>     "albumartistsort",
>     "artistsort",

All variable’s get their slashes replaced before they get passed to the file naming script. That’s because slashes will create directories, and you don’t want your AC/DC albums and up in a folder hierarchy of AC and DC.

1 Like

AC_DC looks silly as a directory name. AC∕DC (\u2215) looks much better

1 Like

It probably depends on your system and font settings, but it actually looks really horrible here :sweat_smile:


But there is a long standing feature request to make the replacement character for this and various other cases configurable.


\u2215 is better than \u2044 as that behaves like a combining character and super/sub scripts numbers for showing fractions. That feature request would have to get forwarded to the unicode governing body

\u27cb? AC⟋DC
\u29f8? AC⧸DC