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

# Configuration > Export

- Settings
- Description of the export configuration file format
- Placeholders for export configurations
- Global placeholders used in export configurations

# Settings

The list shows the available export configurations. You can activate an export configuration by selecting it. This export configuration will be used when running the export command.

You can create a new export configuration by pressing the New configuration button.

You can edit the selected export configuration by pressing the Edit configuration button.

You can delete the selected export configuration by pressing the Delete configuration button.

## Export file name

You can enter the filename of the export file here. If the filename contains some placeholders, Mp3tag will replace them with the specific data at runtime.

## Directory of export configurations

Specify the directory of export configurations here.

## Append data

Enable this option, if you want Mp3tag to append data at an existing export file.

## One file per directory

If this option is enabled, Mp3tag creates one export file for each directory.

## Show selection dialog

If this option is enabled, Mp3tag shows a dialog with the available export configurations at Export.

## Don't create directories

Since you can also use relative and absolute file paths as export file names - e.g. %artist%\%album%.html - this option prevents Mp3tag from creating any directories during the export process.

## Write BOM

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

## Keyboard shortcuts

F2 | Rename export configuration
F4 | Edit export configuration
Insert | New export configuration
Delete | Delete export configuration

Back to main page

# Export configurations

You can specify any text, any of the many placeholders below and instructions for loops in your export configuration. Scripting commands can also be used.

You can set the filename of the exported file with the function $filename(name[,enc]). The optional second parameter sets the encoding of the export file. Possible values are ansi, utf-8 and utf-16.

`$filename(test.txt)
$filename(test.txt,ansi)
$filename(test.txt,utf-8)
$filename(test.txt,utf-16)
`

`$loop(%fieldname%)` starts a new loop. The loop data is sorted by the fieldname.
`$loopend()` ends a loop.
If you want to limit the loop output to a certain number of entries, simply use `$loop(%fieldname%,num)`. This is useful to eliminate duplicate records (num=1).

Back to main page

# Placeholders for export configurations

## Characters with special functionality

`[...]` | The contents of brackets are displayed only if at least one of the placeholders used inside the brackets has been found.
`'` | Outputs raw text without parsing. This will output the contained string and ignore all reserved characters. If you want to output this character please use `''`.
`[]$%` | You have to put the single quote around these reserved characters if you want to use them unparsed.

## Placeholders

You can use these placeholders within the export configurations and the filename of the export file.

Metadata |
`%artist%` | Artist
`%album%` | Album
`%comment%` | Comment
`%genre%` | Genre
`%title%` | Title
`%track%` | Track-Number
`%_total%` | Total number of tracks from xx/xx track-number field
`%year%` | Year
`%fieldname%` | The content of any field name
Technical info |
`%_bitrate%` | Bitrate in kbit/s
`%_bitspersample%` | Bits per sample (available only for some audio formats)
`%_codec%` | Codec
`%_cover_mimetype%` | Mimetype of first cover art in the tag of the file
`%_cover_size%` | Size of first cover art in the tag of the file in bytes
`%_cover_type%` | Cover type of first cover art in the tag of the file
`%_cover_height%` | Cover height of first cover art in the tag of the file in pixels
`%_cover_width%` | Cover width of first cover art in the tag of the file in pixels
`%_covers%` | Count of cover art in the tag of the file
`%_id3v2_character_encoding%` | Encoding of the ID3v2 text frames of the file.
`%_length%` | Length (formatted)
`%_length_seconds%` | Length (in seconds)
`%_mode%` | Mode
`%_samplerate%` | Sample rate
`%_subsong%` | Chapter index for files with chapters
`%_subsong_count%` | Chapter count for files with chapters
`%_tag%` | Available tag types in file
`%_tag_read%` | Displayed tag type
`%_tag_size%` | Size of all tags in bytes
`%_tag_size_appended%` | Size of all appended tags in bytes
`%_tag_size_prepended%` | Size of all prepended tags in bytes
`%_tool%` | Additional codec information (not available for all supported audio formats).
`%_vbr%` | Bitrate type or compression profile
`%_video_bitrate%` | Bitrate of the video for MP4 video files
`%_video_codec%` | Video codec for MP4/MKV video files
`%_video_height%` | Video height for MP4/MKV video files
`%_video_height%` | Video width for MP4/MKV video files
File name / path info |
`%_directory%` | Name of the parent directory
`%_extension%` | File extension
`%_filename%` | File name without extension
`%_filename_ext%` | File name with extension
`%_filename_rel%` | Filepath with extension, relative to Export output file if output and track files are on same drive, else absolute
`%_folderpath%` | Path without file name
`%_folderpath_rel%` | Folderpath relative to Export output file if output and track files are on same drive, else absolute
`%_parent_directory%` | Name of the grandparent folder
`%_path%` | File name with path
`%_volume%` | Volume label
`%_workingdir%` | Name of current working directory
`%_workingpath%` | Path of current working directory
`%_playlist_filename%` | File name of current playlist without extension
`%_playlist_filename_ext%` | File name of current playlist with extension
`%_playlist_folderpath%` | Folderpath of current playlist
File properties |
`%_file_create_date%` | Short creation date
`%_file_create_datetime%` | Long creation date
`%_file_create_datetime_raw%` | Long creation date (unix timestamp)
`%_file_mod_date%` | Short modification date
`%_file_mod_datetime%` | Long modification date
`%_file_mod_datetime_raw%` | Long modification date (unix timestamp)
`%_file_size%` | File size in human readable format
`%_file_size_bytes%` | File size in bytes
`%_file_size_kb%` | File size in kilobytes
`%_file_size_mb%` | File size in megabytes
`%_crc%` | CRC32 value of file content
`%_md5%` | MD5-Hash of the file (slow!)
`%_md5audio%` | MD5-Hash of the audio part of the file (slow and only supported for ID3- and/or APE-only tagged files)
System |
`%_app%` | Mp3tag, e.g. Mp3tag v3.08
`%_counter%` | Current counter value (ascending from 1) of the immediately containing loop
`%_date%` | Short date
`%_datetime%` | Long date
`%_max_counter%` | Maximum value of counter of the last closed loop.
Global placeholders (providing totals for the preceeding $loop/$loopend)
`%_total_files%` | Total number of files
`%_total_size%` | Total file size (formatted output)
`%_total_size_raw%` | Total file size in bytes
`%_total_time%` | Total playing time (formatted output)
`%_total_time2%` | Total playing time (formatted output without days)
`%_total_time_raw%` | Total playing time in seconds

Back to main page

Made with love in Dresden. Copyright © 1999-2021 Florian Heidenreich. All rights reserved.