Reusing a substring of a filename for different fields


Hi there,

I appreciate your help and this support forum, because on nearly any question I had, I found an answer right away. Alas, this time I had not that much success.

My current situation is: I got a mess of cover-sampler. The folder-structure/filename looks like this:
Metal Hard Rock Covers\Vol. 0815\01 Artist - Title (Origartist)

I'd like to have these values in my tags:
album=Metal Hard Rock Covers Vol. 0815
title=Title (Origartist)

Currently, I repeat the Alt+2 import action twice. The formula look like:
1.) %album%\%album%\%track% %artist% - %title%
2.) %dummy% (%ORIGARTIST%)

This is manageable, but is there any way to do this in one step? And I have a problem with the second formula: If the filename contains another couple of brackets, the whole ORIGARTIST-field is a mess, because it will be filled with the text beginning right after the first bracket, e.g.:
Filename=01 Life of Agony - Don't you (Forget about me) (Simple Minds)
Origartist=Forget about me) (Simple Minds

Do you have an idea, how to set up the import formula, to achieve, what I want?


I fear that you have to present only just that data to the applied mask that matches it.

So you could use a filter
%_filename% MATCHES ".(.(."
and then import with a mask like
%album%\%album%\%track% %artist% - %title% (%title%) (%origartist%)
You would catch the other tracks with only one pair of brackets with
%_filename% MATCHES ".


I'm sorry, but I have probably described my problem not clearly enough.
The files are already in the correct folderstructure and they all have appropriate filenames (they are the way I'd like them to have). Alas, the tag quality of the files is not in the same perfect condition. I want to import the correct information from the file-/foldernames with the ALT-2 (filename-to-tag) conversion. Is there a way to use one substring from the filename for two different tagfields in just one conversion?


Instead of using Alt+2 (Filename to Tag converter), create and save an action group containing several actions:

  1. Create the ALBUM field by combining the parent directory and directory names.

    Action type: Format value
    Field: ALBUM
    Format string: %_parent_directory% %_directory%

  2. Pull out various fields from the file name. A 'Guess values' action works much like the converters do.

    Action type: Guess values
    Source format: %_filename%
    Guessing pattern: %track% %artist% - %title%

  3. Get ORIGARTIST from TITLE. The regex shown below pulls out the rightmost string between parentheses.

    Action type: Format value
    Format string: $regexp(%title%,^.((.))$,$1)

This will be a lot quicker to execute than using the converter. Highlight your files, then click the down-arrow next to the Aa button and select your saved action group.


Thank u very much!