Search for [TITLE-TEXT] then write to Genre

I have a bunch of songs that have notes like "[Acapella]" in the title. I want to make an action that will scan for this in the title of the song and when it finds a song like this, overwrites the Genre field with "Acapella".

So it needs to find files like this "SONG TITLE [Acapella] - HD" and then over write the Genre with "Acapella"

Thanks for any help you can give!

If all genres are inside square brackets the you can use an action of the type "Guess values" and the guessing pattern
%title% [%genre%] - HD

If the square brackets are a problem, use
%title% '['%genre%']' - HD

No, there is no generator that looks up a list of genres. You would have to be sure that the information that you want is inside the square brackets.

Filter files with TITLE containing text enclosed in square brackets ...

TITLE MATCHES "[.+]"
... or ...
TITLE MATCHES "[Acapella]"


Copy text enclosed in square brackets from TITLE to GENRE ...

Action "Format value"
... or ...
Converter "Tag - Tag"

Field: GENRE
Formatstring: $regexp(%TITLE%,'^.[(.+)].$','$1')
... or ...
Formatstring: $regexp(%TITLE%,'^.[(Acapella)].$','$1')


Remove text enclosed in square brackets from TITLE ...

Action "Format value"
... or ...
Converter "Tag - Tag"

Field: TITLE
Formatstring: $trim($regexp(%TITLE%,'\s*[.+]\s*',' '))
... or ...
Formatstring: $trim($regexp(%TITLE%,'\s*[Acapella]\s*',' '))


DD.20140228.0919.CET

If you want to set the GENRE tag-field within both tag-types ID3v1 and ID3v2 at once, then you have to use the proper GENRE name, from the list of defined names for ID3v1, and which will be encoded into one-byte-number within the ID3v1 tag.
Be aware of that Mp3tag uses the correct spelling "A Cappella".

DD.20140228.1447.CET

Thanks for the replies! I will try some of these tonight/weekend and get back. Love seeing the different approaches, helps me learn. Honestly I am having a hard time learning MP3Tag for some reason. Normally pretty good with stuff like this.

Thanks again! You guys are awesome here, so glad I found this place!

I don't fully understand why this is yet, I am pretty new to automating tasks like this, etc. I am use to doing this all manually in iTunes and not dealing with Tag formats and their limitations. I appreciate the warning and will keep this in mind.

So I like both of these, but there is an issue. It does take "[Acapella]" and move that, without brackets to the Genre field just like I want. But on all the other songs it copies the whole song title and replaces the Genre field. Is there a way to fix that? Or is the only way to make a filter and only select Acapella tracks?

In case of there is no match, then the function $regexp returns the unchanged source string.

To circumvent this result you can choose one from the alternatives:

  • Set a filter which does a pre-selection of possible matches.

  • Write the result of the formatstring into a temporary helper tag-field as the first step;
    in the second step check the temporary helper tag-field, whether it has the same content as the source string, then decide what to do:
    Let the GENRE tag-field as is or copy the content form the helper tag-field to the GENRE tag-field.
    In the third step remove the helper tag-field.

  • Use an extended version of the given formatstring, which includes the check:

Action "Format value" ... or ... Convert "Tag - Tag" Field: GENRE Formatstring: $if($eql($regexp(%TITLE%,'^.*\[(Acapella)\].*$','$1'),%TITLE%),%GENRE%, $regexp(%TITLE%,'^.*\[(Acapella)\].*$','$1')) ... or ... Formatstring: $if($neql(%TITLE%,$regexp(%TITLE%,'^.*\[(Acapella)\].*$','$1')), $regexp(%TITLE%,'^.*\[(Acapella)\].*$','$1'),%GENRE%)

DD.20140301.0855.CET

You have a pretty incredible grasp of this software. Thank you for your help. That seems to fix the issue. I would love to understand how, but that is a pretty crazy string.

Thank you again for the help!