... But this don't work though :frowning:. I tried that.
just turn around the replace parameters.
the reverse of
$replace(%artist%,/,', ')
is
$replace(%artist%,', ',/)<!--QuoteEnd--></div><!--QuoteEEnd-->
I do not want to be too nitpicking, but want to try to clarify concepts ...
The function call ...
$replace(%ARTIST%,'\',', ')
... replaces all occurences of the backslash character with the character sequence of comma and space.
To reverse the previous process you can use the inverse function call ...
$replace(%ARTIST%,', ','\')
..., which replaces all occurences of the character sequence of comma and space with the backslash character.
If both cases will be combined into one function call, the resulting string should be, will be, the same as the input string, because of the successively inversion ...
$replace(%ARTIST%,'\',', ',', ','\')
.... The content of the tag-field ARTIST will not be changed, presuming there is no comma and space sequence in the original value of the ARTIST tag-field.
Although the names of the both Converter dialogs "Tag - Filename" and "Filename - Tag" gives the impression, that the one will be work inverse to the other, these Converter dialogs are technical different. Especially the inaccuracy of the term 'Format string' in both dialogs makes significant problems in understanding and using.
The Converter "Tag - Filename" offers an edit field named 'Format string' for entering a textual expression to assemble the new filename from values of existing tag-fields with full support by the Mp3tag Scripting Language.
The Converter "Filename - Tag" offers an edit field named 'Format string' for entering a textual expression to split an existing filename (or filepath) into components, which then will be stored into tag-fields, using the names of 'placeholders' given by the 'Format string'.
Each character, which is not enclosed into percent signs will be respected 'as is' as part of the pattern mask.
There is no further support by the Mp3tag Scripting language.
It is not possible to insert a Mp3tag string literal here as it would be used at other places in the Mp3tag application.
The Converter "Filename - Tag" is a guessing machine and works the same as the Action "Guess values".
The user enters a pattern, and the Converter tries to do the best match.
Having this filepath ...
O:\TEST\T1\Some Folder\Best Of (Rocking Beatles Stones #0101) - 1999.mp3
... the Converter "Filename - Tag" can guess ...
Format string: %GENRE1%\%GENRE2%\%DISCNUMBER%\%TRACK% - %TITLE%
GENRE1: TEST
GENRE2: T1
DISCNUMBER: Some Folder
TRACK: Best Of (Rocking Beatles Stones #0101)
TITLE: 1999
... the Converter "Filename - Tag" can guess ...
Format string: %ALBUM% - %YEAR%
ALBUM: Best Of (Rocking Beatles Stones #0101)
YEAR: 1999
... the Converter "Filename - Tag" can guess ...
Format string: %ALBUM% (%DUMMY% %ARTIST% %ARTIST% #%CATNO%) - %YEAR%
ALBUM: Best Of
ARTIST: Beatles Stones
CATNO: 0101
YEAR: 1999
... the Converter "Filename - Tag" can guess ...
Format string: %ALBUM% (%DUMMY% %ARTIST% %DUMMY%) - %YEAR%
ALBUM: Best Of
ARTIST: Beatles
YEAR: 1999
The usage of the percent sign, for enclosing and creating the placeholder names, is a relict from the programmer who introduced this technique at first.
Be aware that these placeholder names, while written in the 'Format string', are only literals, nothing more.
They do not carry a value from any existing tag-field with the same name.
They are only names to make the user think of distributing data into tag-fields named by these names.
It is obvious, the Converter "Filename - Tag" opens a rather open field of usage.
It is obvious, the Converter "Filename - Tag" is not the inverse function of the Converter "Tag - Filename"
DD.20101103.0752.CET
Edit. Changed comment regarding function $replace().
DD.20101103.1619.CET