Format Strings and Available Placeholders

Mp3tag uses format strings in various of its features to describe the structure of file names and imported data. A format string is built of either standard text (e.g., `Music`), placeholders (such as `%artist%`, `%title%`, ...), or slash characters `/` that usually denote directory structures.

Characters with Special Functionality

Some characters have special functionality and need to be treated with extra care. If you experience some unexpected behavior when using format string, check if some of the rules listed below apply.

[...] 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 mask it with an extra one ''.
[]$% You need to put the single quote around these reserved characters if you want to use them unparsed.

Tag and Metadata Information

Mp3tag supports flexible tagging, which means that the names of the tag fields are not fixed. You can reference any field which is, e.g., listed in the extended tag dialog as name via a placeholder %name%.

Some examples:

Placeholder Description
%artist% Artist
%album% Album
%comment% Comment
%genre% Genre
%title% Title
%track% Track Number
%year% Year

Technical Information

Technical information fields begin with an underscore %_ and are read-only.

Placeholder Description
%_bitrate% Bitrate in kbit/s
%_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
%_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_height% Video height if file is MPEG-4 video
%_video_width% Video width if file is MPEG-4 video
%_video_bitrate% Video bitrate if file is MPEG-4 video

File Name and Path Information

Placeholder Description
%_directory% Name of the file's parent folder
%_extension% File extension
%_filename% File name without extension
%_filename_ext% File name with extension
%_folderpath% Path without file name
%_path% File name with path
%_parent_directory% Name of the file's grandparent folder

File Properties

Placeholder Description
%_file_create_date% Short creation date
%_file_create_datetime% Long creation date
%_file_create_datetime_raw% Long creation date (unformatted)
%_file_mod_date% Short modification date
%_file_mod_datetime% Long modification date
%_file_mod_datetime_raw% Long modification date (unformatted)
%_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

Dynamic Information

Placeholder Description
%_counter% Current selection index of the file (ascending from 1)
%_counter_total% Current selection count
4 Likes