- Index
- Menus
- Convert
- Actions
- Export
- Scripting
- Filter
- Columns
- Options
- Donate

# Configuration > Actions

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 Actions Alt+5. 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+5can be used.

You can create, edit, duplicate, and delete action groups using the buttons on the right or the context menu. The button Utils allows for saving the current selection state to a file using the Save selection... menu item. These are then listed in the menu and can be later restored by clicking on the configuration name. The Save menu item saves the current selection state directly (this is only necessary if you choose to not exit the dialog via the OK button).

## Keyboard shortcuts

F2 | Rename action group
F4 | Edit action (group)
Insert | New action (group)
Delete | Delete action (group)

- Case conversion
- Convert codepage
- Export
- Export cover to file
- Format value
- Guess values
- Import cover from file
- Import text file
- Merge duplicate fields
- Remove duplicate fields
- Remove fields
- Remove fields except
- Replace
- Replace with regular expression
- Split field by separator

Back to main page

# Case conversion

Changes upper and lower case of selected tag fields (ARTIST, TITLE, ...) or the filename (_FILENAME) or even field names (_FIELDNAME).

## Examples:

## UPPER case

AIR - MOON SAFARI - 03 - ALL I NEED.MP3

## lower case

air - moon safari - 03 - all i need.mp3

## Mixed Case

Air - Moon Safari - 03 - All I Need.mp3

## Sentence

Air - moon safari - 03 - all i need.mp3

The field Words begin after any of specifies some characters which are marking the beginning of a new word.

_FIELDNAME applies the case conversion settings to the field names of the files (which of course makes only sense with APEv2 or VorbisComments).

Back to main page

# Convert codepage

If you have problems displaying tags with characters from other charsets (like Cyrillic) in Mp3tag, the tags are probably stored in a system codepage instead of Unicode or ISO-8859-1. To convert these tags from a specific codepage to Unicode, simply create a new action Convert codepage, select the appropriate tag field(s) and choose the codepage from the drop-down list.

Back to main page

# Export

Please see Options > Export

Important note: Export actions are always executed after all other actions regardless of their position in the actions list.

Back to main page

# Export cover to file

Exports the cover art from the tag of the file to the relative or absolute filename specified by the format string. You can use placeholders like %artist% and %album% in the format string.

Back to main page

# Format value

Formats tag fields by other fields content, i.e., this action can also be used for copying the content of one tag field to another tag field.
You can use placeholders for any tag field and scripting functions as format string to format the content of the field specified.
Example: to copy the content of the comment field to the encodedby field, set the field to ENCODEDBY and the format string to %comment%.

Back to main page

# Guess values

Imports tag fields from a specified source format string.
This action type is useful if you want to split the content of one tag field to multiple other fields (e.g. the title "Artist / Title" to the appropriate fields using %title% as source format and %artist% / %title% as guessing pattern.

Back to main page

# Import cover from file

Imports the cover art specified by the absolute or relative filename into the tag of the file. You can use placeholders like %artist% or %album%.

Back to main page

# Import text file

Imports the contents of the text file specified by the absolute or relative filename into the specified tag field. You can use placeholders like %artist% or %album% within file name.
Example: to copy the content of the file lyrics.txt to the lyrics field, set the field to UNSYNCEDLYRICS and the format string to lyrics.txt.

Back to main page

# Merge duplicate fields

This action type merges duplicate tag fields (e.g. three artist fields) to one field.
The contents of the duplicate fields in the new field are separated by the specified separator string.

Back to main page

# Remove duplicate fields

This action type removes duplicate tag fields (e.g. three artist fields) and leaves the last field from the tag.

Back to main page

# Remove fields

This action type removes the fields entered in the edit field (e.g. COMMENT;PICTURE).

Removing embedded cover art

Please use PICTURE as field name if you want to remove cover art from the tags.

Back to main page

# Remove fields except

This action type keeps the fields entered in the edit field and removes all other tag fields from the tag (e.g. ALBUM;ARTIST;COMMENT;GENRE;TRACK;YEAR).

Keeping embedded cover art

Please use PICTURE as field name if you want to preserve embedded cover art.

Back to main page

# Replace

This action replaces (or removes) a given string from the selected field (e.g., album or filename) by replacing the strings specified under Original by the string specified under Replace with.
If the only as whole word is enabled, Mp3tag only replaces Original when it is a whole word and not a part of a word.

Back to main page

# Replace with regular expression

This action uses regular expressions when replacing strings in the specified field. Regular expressions is a formal language that is used to find strings or parts of strings that match a specific pattern. This pattern is defined in the field Regular expression and matches are replaced by the given replacement string. Please note that matches can be referenced (see Parenthesis below).

Examples of regular expressions that are useful in the context of Mp3tag can be found at the Regular Expressions topic on the Mp3tag Forums.

Note: At this action _FILENAME applies to the whole file name including its extension.

## Syntax:

## Literals

All characters except . | * ? + ( ) { } [ ] ^ $.
These characters are literals when preceded by a "\".

## Wildcard

The dot character "." matches any single character.

## Repeats

`*` | repeated any number of times including zero
`+` | repeated any number of times, but at least once
`?` | repeated zero or one times only
`a{n}` | is the letter "a" repeated exactly n times
`a{n,}` | represents the letter "a" repeated at least n times with no upper limit
`a{n,m}` | represents the letter "a" repeated between n and m times

## Non-greedy repeats

Non-greedy repeats are possible by appending a '?' after the repeat; a non-greedy repeat is one which will match the shortest possible string.

## Parenthesis

Parentheses serve two purposes, to group items together into a sub-expression, and to mark what generated the match. $N Expands to the text that matched sub-expression N in Replace matches with.

## Alternatives

Alternatives occur when the expression can match either one sub-expression or another, each alternative is separated by a "|".

## Line anchors

^ | matches the start of a line
$ | matches the end of a line

## Sets

`[abc]` | will match either of "a", "b", or "c"
`[^abc]` | will match any character other than "a", "b", or "c"
`[a-z]` | will match any character in the range "a" to "z"
`[^A-Z]` | will match any character other than those in the range "A" to "Z"
`\w` | Any word character - all alphanumeric characters plus the underscore
`\s` | Any whitespace character.
`\d` | Any digit (0-9)
`\l` | Any lower case character
`\u` | Any upper case character
`\W` | non-word character
`\S` | non-whitespace character
`\D` | no digit
`\L` | non-lower case character
`\U` | non-upper case character
`\t` | Tab
`\n` | New line
`\r` | Carriage Return
`\r\n` | Windows style line break
`\xnn` | char with unicode hex value nn
`\x{nnnn}` | char with unicode hex value nnnn

## Word boundaries

`\b` | matches a word boundary (the start or end of a word)
`\B` | matches only when not at a word boundary

Back to main page

# Split field by separator

This action type splits the content of a tag field into multiple separate tag fields based on a given separator character.

Back to main page

All content and graphics are protected by copyright law. Copyright © 2000-2016 Florian Heidenreich