(mac) Creating directories when tag fields include " / " characters

I'd like to sort all of my directories (currently formatted < '['%catalognumber%']' %albumartist% - %album%>) into a few directories based on the value of the %physicalmedia% tags I've given them (vinyl, CD, cassette). In attempting to do this; I ran the following action group:

string: %physical media% / '['%catalognumber%']' %albumartist% - %album%

This worked great for about 3/8ths of the albums. The other 5/8ths in one way or another had a "/" character in one of the tag fields. Causing a new subdirectory to get created wherever the command encountered a "/".

Let me just put it very, very lightly when I say that undoing this error to a collection of 3164 directories was not, in any way, shape, or form, in any reality, dimension, galaxy, afterlife, what would be considered "fun" so on that note; how do I do this without ever having to undo that problematic outcome again?

Enclose the fields in which you suspect a / to be present with
to replace the slash with an underscore.

If you use an abolute path you could move the current (extra) folder to its intended level without manually renaming files or folders.

I mean it could be anything; in the catalog number, in the album artist (any album that's a split or collaboration might have a slash in the name), any double album or b/w single... I'm kind of confused about what I'm supposed to do with this.

What would the string look like, if my absolute path look something like...


If you really only have the %xxx% as field reference, then it would be:

If the %xxx% is more like

Then the string could look like:
String: Volumes/EHD1/MusicArchive/%physical media% /'['$replace(%catalognumber%,/,_)']' $replace( %albumartist% - %album%,/,_)

<<%xxx%>> was placeholder for anything, lemme try out this string tho

Can you help me backpedal through whats happening here when I try to paste that string in:

I think that the definition for catlognumber is not quite correct - $replace() should contain a slash instead of a space.

I have it looking like this now; however when I execute the string, nothing happens.

You could check out every part of the expression in the preview of Convert>Tag-Filename. and then see what the result of each part would be. Do not execute the converter, just have a look at the preview.

WAIT there's a " instead on an ', think we got it here