Filter and Search
The Filter available via View → Filter F3 allows for searching files that meet a certain criteria (e.g., the file name contains specific characters or a tag field has a specific content).
To filter the File List simply start typing in the filter field. As a result, all files that contain the specified filter string in their tag or file name are listed in the File List.
If you remove the filter text from the filter field, the original unfiltered list of files is listed in the File List. The same also happens if you close the Filter.
The format string helper menu displayed when pressing the ► button next to the filter field contains an additional entry Auto-apply filter. If enabled, filtering happens as-you-type and if disabled, applying the filter is done manually on Return.
Sometimes it is necessary to use more complex criteria to search for files (e.g., all files of a specific genre but not of that artist). To achieve this, Mp3tag supports filter expressions. Filter expressions are simple expressions that consist of tag field names, filter keywords and text.
Notes
-
If
<field>
or<string>
contains spaces, it should be enclosed in double quotation marks, e.g.,artist IS "Hidden Orchestra"
. -
If
<field>
in HAS/IS/GREATER/LESS/EQUAL/MATCHES contains$
or%
it should be enclosed in double quotation marks and will be treated as a format string instead of a tag field name. This will decrease search speed on large libraries since the format strings need to be evaluated before filtering. -
It is not possible to filter by strings containing double quotations marks. This is a limitation of the feature.
-
To filter for fields containing double quotation marks, use
"$ifgreater($strstr(%field%,$char(34)),0,yes,no)" IS yes
or
field MATCHES \"
-
All operations are non-case sensitive. All filter keywords must be uppercase.
Filter Syntax
<string>
Returns only files that contain every word in the string as a word or substring thereof. A word is a contiguous sequence of characters excluding the space character.
Example:
Hidden Orchestra
This filter string lists all files that contain the wordsHidden
andOrchestra
in tags or file names.
<field> HAS <string>
Returns only files that have all words from
<string>
in their tag field named<field>
. You can use*
to address all fields.Example:
artist HAS Orchestra
Lists all files where theartist
field containsOrchestra
(e.g., Hidden Orchestra and The Cinematic Orchestra).
<field> IS <string>
Returns only files where the content of at least one tag field named
<field>
is equal to<string>
.Example:
artist IS "Hidden Orchestra"
Lists all files where theartist
field isHidden Orchestra
.
<expr1> AND <expr2>
<expr1> OR <expr2>
Combines the filter expressions
<expr1>
and<expr2>
by logical and or or. Parentheses can be used to group combined expressions.Example:
artist IS Hidden Orchestra OR artist IS The Cinematic Orchestra
Lists all files where anartist
field is eitherHidden Orchestra
orThe Cinematic Orchestra
.
NOT <expr>
Inverts the result of
<expr>
.Example:
NOT artist IS "Hidden Orchestra"
Lists all files where theartist
field is notHidden Orchestra
.
<field> GREATER <number>
<field> LESS <number>
<field> EQUAL <number>
Returns all files where the content of tag field named
<field>
is greater, equal, or less that the integer value specified by<number>
.Example:
"%_bitrate%" GREATER 180
Lists all files with a bitrate above 180. Please note that<field>
is a format string in that example.
<field> ABSENT
<field> MISSING
Returns all files which don’t have a tag field named
<field>
.
Example:
albumartist MISSING
Lists all files that don’t have the albumartist field.
<field> PRESENT
Returns all files which have a tag field named
<field>
.
Example:
albumartist PRESENT
Lists all files that have the albumartist field.
<field> MATCHES <regexp>
Returns only files where the content of the tag field named
<field>
matches against the regular expression <regexp>. You can use*
to address all fields.Example:
track MATCHES \d\/\d
Lists all files where the tracknumber is in#/#
format.