Converters to rename files or to import tags

Mp3tag provides a variety of possibilities to get tag information from parts of the filename or rename files based on the information stored in the tag of a file.

The base concept behind all converters in Mp3tag is the so called format string, which describes a pattern (or template) of a filename or a line in a tag-list file.

A format string consists of any characters and predefined placeholders or scripting functions. Every placeholder begins with the percent sign %, followed by a tag field name and ends with the percent sign.
For example, the placeholder %album% refers to the Album field.

1 Like
Batch File Renaming
Extract text from title or filename
How to tag audio files based on folder name
folder structure importing
How change columns ?
Filename Title?
Physically moving files
Keeping tracks in correct order
Album Art saved to all my tracks instead of one
basic instructions
How can I rename the folder using the *album* tag ?
Filename to Artist and Title
[Formating] How can i format, rename and export
Putting Filenames as Titles in MP3s on all files in a folder
Get tags from file
Dateiname und fortlaufende Nummer
Thanks and documentation suggestion
Tagging from folders and files
Exporting yields only folder.jpg as cover art image for all albums
Can you setup a file naming script?
How do I Autotag by filename?
Ordnerstruktur erstellen anhand der Tags
Tags from folder name
Multiple artists in single folder
i just want to change the title so they are the same as filename
Tagging Using folder and subfolders only
How do I move a part of the filename that is in various positions
Scene Directories
Setting full directory path to "Genre" tag?
Convert Filename to tags
Important FAQ change regarding folder rename
[X] Verzeichnis wird ge├Ąndert, wenn Dateiname ge├Ąndert wird bei '/\' im Interpret
Dateinamen einfach umbennen
MP3Tag edits not being saved into original folder
Tags from file path
How do I create folders for all albums tagged?
Is there a setting that creates folders after files have been tagged?
Title to Exactly Match Filename
[X] Special chars in tags retrieved from Amazon or freedb cause invalid filenames
Feature Request: Create folder for each Artist
Getting folder name as album tag
Auto Sorting Batch Job to Folders
Volumed (multiple part) Compilation Folder Creation
[X] Tag to Filename has an issue with slashes in the tag names
Creating title ID tag from file name WITHOUT the leading track #
Fixing folder structure
V2.95 - Tag -> Filename mistreats "\" in tags
Bach copy filname to titlefield

How to rename files based on tags?

Renaming files, creating folders and complete directory structures from tags can be done by using the :mt_ttf: Converter > Tag - Filename with a format string. A format string is used to describe the structure of the desired filename.

Besides using normal placeholders (such as %artist%, %title%, ...) and arbitrary text (e.g., Music) it also allows for separating folders with the backslash \ character.

Here is an example that renames the file based on the tags using the Tracknumber. Title format:
$num(%track%,2). %title%
Please note, that the $num scripting function is used to ensure double-digit track numbers.

How to create directory structures based on the tags and move the files?

When you're using a backslash in a format string, Mp3tag will create a directory from the part of the format string in front of a backslash.

Here is an example that creates new directories under D:\Music:
D:\Music\$left(%artist%,1)\%artist%-%year%-%album%\$num(%track%,2). %title%
The same is also possible using relative path names (instead of an absolute path in the example above) which creates the new directory below the current working directory:
%artist%-%year%-%album%\$num(%track%,2). %title%

Please note, that the whole range of Mp3tag's Scripting Functions can be used in the format string.

How to import parts of the filename into the tag?

Importing tags for filenames and directory names can be done by using the Converter > Filename - Tag Converter > Filename - Tag.

The basic concept is the notion of a format string which describes the structure of the name to import from. The format string is built of either standard text (e.g., Music), placeholders (such as %artist%, %title%, ...), or backslash characters \ that denote directory structures.

Here is an example that imports tags from a file name 02. Four Ton Mantis.mp3
%track%. %title%

Please note how the format string completely resembles the structure of the file name.

How to import parts of the folder structure into the tag?

It's also possible to import information from the directory structure of the file path where the backslash character is used to mark the different folders.

For example, the information from the path
Amon Tobin\[2000] supermodified\02 - For Ton Mantis.mp3
can be imported using
%artist%\[%year%] %album%\%track% - %title%

Of course, sometimes it's also needed to omit some information that should not imported to the tag. This can be done using the %dummy% placeholder for the unneeded part of the file path.