Mp3tag provides a variety of actions, which can be applied to filenames and tags. The actions are grouped together into named sets (action groups), which can be applied independently via Alt + 6. If you do not want to create a reusable action group for applying one single action, the Actions (Quick) toolbar button or keyboard shortcut Shift + Alt + 6 can be used.
First, create a new action group via Actions > Actions or Alt + 6.
Then, click on the button New and give your action group an expressive name, e.g., "All tag fields Upper Case". This action group can be applied to the selected files after you have added one or more actions to it.
Now, you can create a new action in your action group via the button New and choose the desired action type from the list.
At the moment the following action types are available
You can combine different actions (e.g., Case conversion and Replace) in one action group and activate or deactivate them via the checkmarks in the Actions > Actions dialog.
How to change upper/lower case of tag fields or filenames?
Create a new action in an existing action group and choose Case conversion as action type.
Field determines which parts of the tags/filename should be changed.
Case conversion determines how the upper/lower case of the field will be changed.
If you want for example mark chars after a left parenthesis or a hyphen as the begin of a word, enter the respective char under Words begin from/after any of.
In order to remove text strings, create a new action in an existing action group and choose Replace as action type.
Field: Here you can enter which field(s) you want to change.
You can choose
_ALL, which affects tags AND filenames,
_TAG which affects all tag fields,
_FILENAME which only affects the filename,
or simply one of the other supported tag fields.
Original: Here you enter the string that you want to delete.
Replace with: Just leave this empty, because you're going to delete the string in Original.
Example:
Assume that you want to remove Obsolete from the filename ThisShouldRemainObsolete so that ThisShouldRemain is the result. To achieve that, just enter Obsolete at Original.
In order to get better readability for a filename like "Artist - Title", you can add spaces so that it reads "Artist - Title"
Create a new action in an existing action group, choose Replace as action type and enter (without the quotes):
Field: _FILENAME
Original: " - "
Replace with: " - "
You can activate the action group via Convert, Actions and apply it to the selected files.
Unintended duplication of spaces can occur, if you're executing this action several times. "x - x" becomes "x - x", and "x - x" becomes "x - x" etc. You can prevent this by adding a second action that makes " " (3 spaces) to " " (2 spaces).
It is even more simple if your files are already properly tagged: you can use the converter Tag - Filename with the format string "%artist% - %title%" and get the same result.
In order to remove some leading characters from the filename or a tag field, create a new action in an existing action group and choose Replace with regular expression as action type.
Field: choose where you want to remove the chars.
Regular expression: enter ^.{3} if you want to remove 3 chars.
Replace matches with stays empty.
You can enter the number of chars to be removed between the two curly brackets.
To remove the last 3 characters use .{3}$ (but do not use this on _FILENAME as it would remove the file extension).
Some titles start with "The", others with "Der" or "Die". Mass-deleting the first 3 characters doesn't have the desired result, because all other tags/filenames will be shortened too.
To remove specific leading chars, create a new action in an existing action group and choose Replace with regular expression as action type.
Field: choose where you want to remove the chars.
Regular expression*: enter ^The\s+
Replace matches with stays empty.
If you execute this action on your selected files, all The's and following spaces will be deleted. Of course, it works the same way with any other word.
^ matches the beginning of the string. Then \s+ searches for all whitespaces till a different char occurs.
The whitespaces found will be replaced by nothing and, thus, deleted.
This regular expression removes the track number from 01 - Anything.. so that only Anything... remains. ^ matches the beginning of the string. Then any numbers of whitespaces \s* followed by numbers from 0-9.
The \s*-\s* part removes the hyphen and any whitespace characters around it.
How to separate or split strings that are written in one word?
You have titles that have no spaces between words (written in one big word) and all words start with a capital letter, e.g., ThisIsTheTitle (also referred to as CamelCase). How can Mp3tag separate the individual words and insert a space before every capital letter?
Create a new action group, e.g., TagsLikeThese for the field you wish to edit (the example uses the TITLE field):
Action type: Replace with regular expression
Field: TITLE
Regular expression: (\l)(\u)
Replace matches with: $1 $2 [x] case-sensitive comparison
How to apply upper case after an O' (like O'Hugo)?
There are irish/scottish names like O'Donnel, O'Leary etc, that all should be upper case. But you cannot use upper case in general after an ' because other words would be spelled wrongly then (That'S, Ain'T etc.).
Note: The ~ sign is just used to separate the two fields, you could take any other sign that does not appear in your fields, e.g. ¢ or an extended unicode character like ∞ or ∑.
Example how to copy the content of the ARTIST field to the ALBUMARTIST field:
Create a new action in an existing action group or make a new action group.
Action type: Format value
Field: ALBUMARTIST
Format string: %artist%
Note: If you want to copy all possible values of a field (in case you have multiple artist fields), the internal scripting function $meta_sep can be used in the format string, e.g., $meta_sep(artist,\\\\)
While it's not directly possible to assign arbitrary keys to action groups, you can use the keyboard shortcut to trigger the action group menuAlt+A in combination with another character from the action group name. Simply decide on the character and prefix it with &. You can then use Alt+A and the character to trigger the action group.
An example action group &Uppercase can be triggered by Alt+A plus U.
Submenus in the Action Group menu
If you use the # in your action group name, Mp3tag uses anything before the # as name for a submenu and anything after as a menu item in that menu. By that, you can organize action groups that belong together.
An example action group Default values#Set COMMENT would create a submenu Default values and would list the action group Set COMMENT within this menu.
Pro tip: you can combine both tips, e.g., &Default values#Set &COMMENT to trigger the action group by pressing Alt+A plus D plus C.