Exporting Tag and File Information

Mp3tag allows for exporting tag and file information to text-based file formats via File → Export Ctrl+E.

Each export uses an export configuration that describes the format that is used and the contents that are exported when running the export function. An export configuration serves as a template for the export.

The Export List shows the available export configurations. You can activate an export configuration by selecting it. This export configuration is then used when running the export command.

The Export file name shows the file name that is used for the target export file. This can be a relative or absolute file name, possibly including placeholders.

The default file name and/or file extension can be set from the export configuration (see $filename() below). Otherwise the previously used file name is prefilled. The file name to be used can always be adjusted upon export when the export dialog is shown.

After exporting, a confirmation message is shown (if enabled at Options → Messages) that allows for opening the exported file with the default program associated with the file extension of the exported file.

If Append data is enabled, the exported data is appended to a possibly existing file at the target export file path.

If One file per directory is enabled or the Shift key is pressed, Mp3tag creates on export file for each directory it encounters.

Configuration Options

The options dialog at Tools → Options → Export offers additional configuration options.

If Show selection dialog is enabled, the Export dialog is shown on export.

If Don't create directories is enabled, no directories are created even if the export file name contains folder specifications.

If Write BOM is enabled and writing of UTF-8 or UTF-16 is enabled via the $filename function in the export configuration, this option enables writing of a Byte Order Marker which is required by some applications.

Adding, Duplicating, and Removing Export Configurations

You can add and remove export configurations via the New and Remove buttons next the list of export configurations. The Duplicate button is used to create a copy of the selected export configuration.

Editing Export Configurations

You can rename an export configuration via a delayed double click on the export configuration name or by pressing F2.

Editing an export configuration can be done via double click on the export configuration, the Edit button, or by pressing F4. Export configurations are text files itself, so that editing is possible with any text editor.

You can use any text, any placeholders and scripting functions, as well as the following export-related scripting functions.

Export Scripting Functions

Function Description
$filename(name,enc) Optional statement that sets the file name, file extension, and/or encoding of the exported file. Needs to appear at the beginning of the export configuration. The optional second parameter sets the encoding of the export file. Possible values are ansi, utf-8, and utf-16.
$loop(%fieldname%,num) Starts a new loop. The loop data is sorted by the given field name. The optional second parameter limits the loop output to a certain number of entries. This is useful to eliminate duplicate records (num=1)
$loopend() Ends a loop.
$get(x) Returns the value of the user-defined variable x.
$put(x,y) Sets the value of the user-defined variable x to y and returns y.
$puts(x,y) Sets the value of the user-defined variable x to y and returns nothing.

Further Reading