WebHelp:Configuring Directory and File Formats: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
mNo edit summary
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Main Page|Wiki Home]] > [[{{WebHelp:Links|Content}}|MediaMonkey 5 Help]] > Masks to Configure Folder and Filename Formats
[[Main Page|Wiki Home]] > [[{{WebHelp:Links|Content}}|MediaMonkey 2024 Help]] > [[WebHelp:Reference_Information|Reference Information]] > Masks to Configure Folder and Filename Formats
----
----


Line 6: Line 6:
== Introduction ==
== Introduction ==


When [[{{WebHelp:Links|Ripping Tracks from CDs}}|ripping]], [[{{WebHelp:Links|Converting Formats}}|converting]], [[{{WebHelp:Links|Exploring Tracks}}|synchronizing tracks to a portable device]], or [[{{WebHelp:Links|Changing Filenames}}|auto-organizing files]], you can select the format in which the folders and filenames will be created. When [[{{WebHelp:Links|Auto-Tag from Filename}}|auto-tagging from filenames]], you can select what tags will be updated based on the folder/filename format. This section describes Folder and Filename Masks that allow you to define these formats.  
When [[{{WebHelp:Links|Ripping Tracks from CDs}}|ripping]], [[{{WebHelp:Links|Converting Formats}}|converting]], [[{{WebHelp:Links|Exploring Tracks}}|syncing]], or [[{{WebHelp:Links|Changing Filenames}}|organizing files]], you can select the format in which the folders and filenames will be created. When [[{{WebHelp:Links|Auto-Tag from Filename}}|tagging from filenames]], you can select what tags will be updated based on the folder/filename format. This section describes Folder and Filename Masks that allow you to define these formats.  
[[File:Wiki-MM2024 Tag from Filename (sample).png|center|Example of Tag from Filename Mask]]




Line 25: Line 26:
== Mask Reference  ==
== Mask Reference  ==


The table below describes most of the commonly used characters and fields in a mask.  
The table below describes most of the commonly used characters and fields in a mask. To remap non-standard characters, see:
[https://www.mediamonkey.com/support/knowledge-base/mediamonkey-tagging-organizing/how-to-remap-characters-for-auto-organize/ How to remap characters for 'Organize files...']


{| cellspacing="0" cellpadding="1" border="1" align="Default" width="100%"
{| cellspacing="0" cellpadding="1" border="1" align="Default" width="100%"
Line 33: Line 35:
| width="15%" | ' ' (space)  
| width="15%" | ' ' (space)  
| width="80%" | A space in a mask appears as a space in the path/filename that is written. Note that spaces automatically disappear in case they are in the beginning or end of a filename.
| width="80%" | A space in a mask appears as a space in the path/filename that is written. Note that spaces automatically disappear in case they are in the beginning or end of a filename.
|-
|- style="background:#f4f4f4;"
| width="15%" | ''''-''''  
| width="15%" | ''''-''''  
| width="80%" | A dash in a mask appears as a dash in the path/filename that is written.
| width="80%" | A dash in a mask appears as a dash in the path/filename that is written.
Line 39: Line 41:
| width="15%" | ''''\''''  
| width="15%" | ''''\''''  
| width="80%" | A slash following a mask element causes a directory to be created.
| width="80%" | A slash following a mask element causes a directory to be created.
|-
|- style="background:#f4f4f4;"
| width="15%" | ''''.\''''
| width="15%" | ''''.\''''
| width="80%" | A .\ at the beginning of a mask causes whatever portions of the mask that follow to be written in the same directory as the source file(s). For example, a mask of C:\My Music\<Artist> - <Title> would write tracks to C:\My Music, but a mask of .\<Artist> - <Title> would write the new filenames into the directories from which the source files originate.
| width="80%" | A .\ at the beginning of a mask causes whatever portions of the mask that follow to be written in the same directory as the source file(s). For example, a mask of C:\My Music\<Artist> - <Title> would write tracks to C:\My Music, but a mask of .\<Artist> - <Title> would write the new filenames into the directories from which the source files originate.
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
Line 48: Line 50:
| width="15%" | '''<Added>'''  
| width="15%" | '''<Added>'''  
| width="80%" | Writes the Library Added field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Library Added field to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Artist>'''  
| width="15%" | '''<Artist>'''  
| width="80%" | Writes the Artist field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Artist field to a directory or filename (depending on whether it is followed by a '\')
Line 54: Line 56:
| width="15%" | '''<Album>'''  
| width="15%" | '''<Album>'''  
| width="80%" | Writes the Album field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Album field to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Title>'''  
| width="15%" | '''<Title>'''  
| width="80%" | Writes the Title field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Title field to a directory or filename (depending on whether it is followed by a '\')
Line 60: Line 62:
| width="15%" | '''<Genre>'''  
| width="15%" | '''<Genre>'''  
| width="80%" | Writes the Genre field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Genre field to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Disc#>'''  
| width="15%" | '''<Disc#>'''  
| width="80%" | Writes the Disc Number field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Disc Number field to a directory or filename (depending on whether it is followed by a '\')
Line 66: Line 68:
| width="15%" | '''<Track#>'''  
| width="15%" | '''<Track#>'''  
| width="80%" | Writes the Track Number field to a filename (assuming it is not followed by a '\')
| width="80%" | Writes the Track Number field to a filename (assuming it is not followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Year>''', '''<Date>'''  
| width="15%" | '''<Year>''', '''<Date>'''  
| width="80%" | Writes the Year field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Year field to a directory or filename (depending on whether it is followed by a '\')
Line 72: Line 74:
| width="15%" | '''<Original Date>'''  
| width="15%" | '''<Original Date>'''  
| width="80%" | Writes the Original Date field (as Year) to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Original Date field (as Year) to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Bitrate>'''  
| width="15%" | '''<Bitrate>'''  
| width="80%" | Writes the Bitrate field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Bitrate field to a directory or filename (depending on whether it is followed by a '\')
Line 78: Line 80:
| width="15%" | '''<Album Artist>'''  
| width="15%" | '''<Album Artist>'''  
| width="80%" | Writes the Album Artist field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Album Artist field to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<BPM>'''  
| width="15%" | '''<BPM>'''  
| width="80%" | Writes the Beats Per Minute field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Beats Per Minute field to a directory or filename (depending on whether it is followed by a '\')
Line 84: Line 86:
| width="15%" | '''<Composer>'''  
| width="15%" | '''<Composer>'''  
| width="80%" | Writes the Composer field to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Composer field to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#f4f4f4;"
| width="15%" | '''<Custom''' ''X'''''>'''  
| width="15%" | '''<Custom''' ''X'''''>'''  
| width="80%" | ''X'' can have a value between 1 to 10. Writes 1 of the 10 Custom fields to a directory or filename (depending on whether it is followed by a '\'). Example: '''<Custom 2>'''.
| width="80%" | ''X'' can have a value between 1 to 10. Writes 1 of the 10 Custom fields to a directory or filename (depending on whether it is followed by a '\'). Example: '''<Custom 2>'''.
Line 90: Line 92:
| width="15%" | '''<Podcast>'''  
| width="15%" | '''<Podcast>'''  
| width="80%" | Writes the Podcast name to a directory or filename (depending on whether it is followed by a '\')
| width="80%" | Writes the Podcast name to a directory or filename (depending on whether it is followed by a '\')
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
|-
|- style="background:#f4f4f4;"
| width="15%" | <Ignore:''X''>''
| width="15%" | <Ignore:''X''>''
| width="80%" | Ignores x characters in the path. Used only for [[{{WebHelp:Links|Auto-Tag_from_Filename}}|Auto-tag from Filename]].
| width="80%" | Ignores x characters in the path. Used only for [[{{WebHelp:Links|Auto-Tag_from_Filename}}|Tag from Filename]].
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
Line 102: Line 104:
| width="15%" | $First(<'Field'>,count,skip)  
| width="15%" | $First(<'Field'>,count,skip)  
| width="80%" | Limits the number of values for multiple definition fields to count, optionally skipping skip values. For instance:<br> &lt;Genre&gt; would yield: Rock;Pop;Acoustic<br> $First(&lt;Genre&gt;) would yield: Rock<br> $First(&lt;Genre&gt;,2) would yield: Rock;Pop<br> $First(&lt;Genre&gt;,1,1) would yield: Pop
| width="80%" | Limits the number of values for multiple definition fields to count, optionally skipping skip values. For instance:<br> &lt;Genre&gt; would yield: Rock;Pop;Acoustic<br> $First(&lt;Genre&gt;) would yield: Rock<br> $First(&lt;Genre&gt;,2) would yield: Rock;Pop<br> $First(&lt;Genre&gt;,1,1) would yield: Pop
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;'Field':n&gt;  
| width="15%" | &lt;'Field':n&gt;  
| width="80%" | Can be used in conjunction with any of the above mask elements in order to force alphabetic fields to a specified length or to pad alphanumeric fields. For instance:<br> C:\My Music\&lt;Artist:1&gt;\&lt;Artist&gt;\&lt;Album&gt; - &lt;Track #&gt; - &lt;Title&gt; which would yield C:\My Music\A\Abba\Gold - 2 - Fernando.mp3 , useful for creating alphabetized directories. <br> &lt;Track#:2&gt; would yield 07 (for Track=7), and would yield 153 (for Track 153) <br>Numeric fields are not truncated: e.g. &lt;Year:3&gt; would yield 1940 (for 1940); <br>&nbsp; The exception being: &lt;Year:2&gt; would yield 40 (aside from this specific field and value, numeric fields are not otherwise truncated) <br> Note: For text fields, the resultant characters start from the left. For numeric fields, the resultant digits start from the right. If n &gt; the number of characters in the field, then the resultant path is padded with spaces or 0's depending on whether the field is text or numeric.
| width="80%" | Can be used in conjunction with any of the above mask elements in order to force alphabetic fields to a specified length or to pad alphanumeric fields. For instance:<br> C:\My Music\&lt;Artist:1&gt;\&lt;Artist&gt;\&lt;Album&gt; - &lt;Track #&gt; - &lt;Title&gt; which would yield C:\My Music\A\Abba\Gold - 2 - Fernando.mp3 , useful for creating alphabetized directories. <br> &lt;Track#:2&gt; would yield 07 (for Track=7), and would yield 153 (for Track 153) <br>Numeric fields are not truncated: e.g. &lt;Year:3&gt; would yield 1940 (for 1940); <br>&nbsp; The exception being: &lt;Year:2&gt; would yield 40 (aside from this specific field and value, numeric fields are not otherwise truncated) <br> Note: For text fields, the resultant characters start from the left. For numeric fields, the resultant digits start from the right. If n &gt; the number of characters in the field, then the resultant path is padded with spaces or 0's depending on whether the field is text or numeric.
Line 108: Line 110:
| width="15%" | &lt;'Field':-n&gt;  
| width="15%" | &lt;'Field':-n&gt;  
| width="80%" | Same as above except that if n &gt; the number of characters in the field, then the resultant path is padded with spaces or 0's (depending on whether the field is text or numeric) from the opposite side.
| width="80%" | Same as above except that if n &gt; the number of characters in the field, then the resultant path is padded with spaces or 0's (depending on whether the field is text or numeric) from the opposite side.
|-
|- style="background:#f4f4f4;"
| width="15%" |  
| width="15%" |  
&lt;'Field'@n&gt;  
&lt;'Field'@n&gt;  
| width="80%" |  
| width="80%" |  
Creates alphabetical directories grouped in sets of x letters. For example: C:\My Music\&lt;Artist@3&gt;\&lt;Title&gt; would create directories with all Artists beginning with ABC, DEF, GHI, etc.  
Creates alphabetical directories grouped in sets of x letters. For example: C:\My Music\&lt;Artist@3&gt;\&lt;Title&gt; would create directories with all Artists beginning with ABC, DEF, GHI, etc.  
|-
|-
| $RemovePrefix(string)  
| $RemovePrefix(string)  
| Removes a prefix from a string. e.g. $RemovePrefix(&lt;Artist&gt;) changes 'The Beatles' -&gt; 'Beatles' . Prefixes are configured in Tools &gt; Options &gt; Library &gt; Appearance &gt; Ignore prefixes.
| Removes a prefix from a string. e.g. $RemovePrefix(&lt;Artist&gt;) changes 'The Beatles' -&gt; 'Beatles' . Prefixes are configured in Tools &gt; Options &gt; Library &gt; Appearance &gt; Ignore prefixes.
|-
|- style="background:#f4f4f4;"
| $MovePrefix(string)  
| $MovePrefix(string)  
| Moves a prefix to the end of a string. e.g. $MovePrefix(&lt;Artist&gt;) changes 'The Beatles' -&gt; 'Beatles, The'. Prefixes are configured in Tools &gt; Options &gt; Library &gt; Appearance &gt; Ignore prefixes.
| Moves a prefix to the end of a string. e.g. $MovePrefix(&lt;Artist&gt;) changes 'The Beatles' -&gt; 'Beatles, The'. Prefixes are configured in Tools &gt; Options &gt; Library &gt; Appearance &gt; Ignore prefixes.
Line 124: Line 124:
| $Group(string,integer)  
| $Group(string,integer)  
| Groups the first letter of the string into sets of letters of length specified by (optional) integer parameter. e.g. \$Group(&lt;Artist&gt;,2) for 'U2' would yield \UV (similar to &lt;Artist@2&gt;.
| Groups the first letter of the string into sets of letters of length specified by (optional) integer parameter. e.g. \$Group(&lt;Artist&gt;,2) for 'U2' would yield \UV (similar to &lt;Artist@2&gt;.
|-
|- style="background:#f4f4f4;"
| $Replace(string,what,by)  
| $Replace(string,what,by)  
| Replaces all occurrences in a 'string' of 'what' by 'by'.
| Replaces all occurrences in a 'string' of 'what' by 'by'.
Line 130: Line 130:
| $Left(string,n)  
| $Left(string,n)  
| Returns the left n characters of string.
| Returns the left n characters of string.
|-
|- style="background:#f4f4f4;"
| $Right(string,n)  
| $Right(string,n)  
| Returns right n characters of string.
| Returns right n characters of string.
Line 136: Line 136:
| $Mid(string,i,n)  
| $Mid(string,i,n)  
| Returns n characters of string starting with character ''i''
| Returns n characters of string starting with character ''i''
|-
|- style="background:#f4f4f4;"
| $RightFrom(string,i)  
| $RightFrom(string,i)  
| Returns everything after the occurrence of The character ''i''
| Returns everything after the occurrence of The character ''i''
|-
|-  
| $LeftFrom(string,i)  
| $LeftFrom(string,i)  
| Returns everything before the occurrence of the character ''i''
| Returns everything before the occurrence of the character ''i''
|-
|- style="background:#f4f4f4;"
| $Pos(string,i)  
| $Pos(string,i)  
| Returns the position of character ''i''
| Returns the position of character ''i''
Line 148: Line 148:
| $Trim(string)  
| $Trim(string)  
| Returns string with spaces trimmed from the beginning and end of string
| Returns string with spaces trimmed from the beginning and end of string
|-
|- style="background:#f4f4f4;"
| $Upper(string)  
| $Upper(string)  
| Converts string to uppercase
| Converts string to uppercase
Line 154: Line 154:
| $Lower(string)  
| $Lower(string)  
| Converts string to lowercase
| Converts string to lowercase
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;Folder:n&gt;  
| width="15%" | &lt;Folder:n&gt;  
| width="80%" | This will recreate all folders in a source path except for the first 'n' directories. For example: C:\My Music\&lt;Folder:2&gt;\&lt;Title&gt; would create the source directory structure (without the first 2 directories in the source paths), followed by track title.
| width="80%" | This will recreate all folders in a source path except for the first 'n' directories. For example: C:\My Music\&lt;Folder:2&gt;\&lt;Title&gt; would create the source directory structure (without the first 2 directories in the source paths), followed by track title.
Line 163: Line 163:
| width="15%" | &lt;Folder:-n&gt;  
| width="15%" | &lt;Folder:-n&gt;  
| width="80%" | This will recreate only the last n folders in a source path. This is very useful when it is known that the source directory is homogeneously structured.
| width="80%" | This will recreate only the last n folders in a source path. This is very useful when it is known that the source directory is homogeneously structured.
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;Playlist&gt;  
| width="15%" | &lt;Playlist&gt;  
| width="80%" | Writes the Playlist name for any Playlists that have been selected to a folder (assuming it is followed by a '\'). This mask can only be used for [[WebHelp:Exporting_Tracks/5.0|Sync]], [[WebHelp:Burning_an_Audio_CD/5.0|CD Burning]] and Exporting tracks.
| width="80%" | Writes the Playlist name for any Playlists that have been selected to a folder (assuming it is followed by a '\'). This mask can only be used for [[WebHelp:Exporting_Tracks/5.0|Sync]], [[WebHelp:Burning_an_Audio_CD/5.0|CD Burning]] and Exporting tracks.
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
Line 172: Line 172:
| width="15%" | &lt;Filename&gt;<br>&lt;Filename:n&gt;  
| width="15%" | &lt;Filename&gt;<br>&lt;Filename:n&gt;  
| width="80%" | This recreates the current filename, and can be used with modifiers to force the resultant text to a set length.
| width="80%" | This recreates the current filename, and can be used with modifiers to force the resultant text to a set length.
|-
|- style="background:#f4f4f4;"
| &lt;Type&gt;  
| &lt;Type&gt;  
| Writes the file type to a directory \My Music\MP3\U2... or \My Music\M4A\U2....
| Writes the file type to a directory \My Music\MP3\U2... or \My Music\M4A\U2....
Line 178: Line 178:
| &lt;Extension&gt;  
| &lt;Extension&gt;  
| Writes the file extension (in lower case) to a directory \My Music\mp3\U2... or \My Music\m4a\U2....
| Writes the file extension (in lower case) to a directory \My Music\mp3\U2... or \My Music\m4a\U2....
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;Auto Number&gt;<br>&lt;Auto Number:n&gt;  
| width="15%" | &lt;Auto Number&gt;<br>&lt;Auto Number:n&gt;  
| width="80%" | This creates a sequential number that can be inserted into the path. This is especially useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish for tracks in a playlist to be played in the order of the playlist (rather than alphabetical order). By default, 3 digits are used, though this is configurable.
| width="80%" | This creates a sequential number that can be inserted into the path. This is especially useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish for tracks in a playlist to be played in the order of the playlist (rather than alphabetical order). By default, 3 digits are used, though this is configurable.
Line 184: Line 184:
| width="15%" | &lt;Random&gt;<br>&lt;Random:n&gt;  
| width="15%" | &lt;Random&gt;<br>&lt;Random:n&gt;  
| width="80%" | This creates a random number that can be inserted in the path. It is most useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish to ensure that the tracks will be played in random (rather than alphabetic) order. By default, 4 digits are used, though this is configurable by setting n.
| width="80%" | This creates a random number that can be inserted in the path. It is most useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish to ensure that the tracks will be played in random (rather than alphabetic) order. By default, 4 digits are used, though this is configurable by setting n.
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;Path&gt;  
| width="15%" | &lt;Path&gt;  
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter.
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter.
Line 190: Line 190:
| width="15%" | &lt;Path:n&gt;  
| width="15%" | &lt;Path:n&gt;  
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter or the first n folders of the source path.
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter or the first n folders of the source path.
|-
|- style="background:#f4f4f4;"
| width="15%" | &lt;Path:-n&gt;  
| width="15%" | &lt;Path:-n&gt;  
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter or the last n elements of the source path.
| width="80%" | This recreates the same path and filename as the original source file(s), without the drive letter or the last n elements of the source path.
|-
|- style="background:#000000;"
| width="15%" |  
| width="15%" |  
| width="80%" |  
| width="80%" |  
Line 207: Line 207:
'''Note:''' Make sure to precede all control characters such as '''')'''' or '''','''' with ''''$'''' if you wish them to appear as normal characters. For example:<br> --- \My Music\$if(&lt;artist&gt;,&lt;artist&gt; (&lt;year&gt;'''$'''),Unknown)\&lt;track&gt;<br>  
'''Note:''' Make sure to precede all control characters such as '''')'''' or '''','''' with ''''$'''' if you wish them to appear as normal characters. For example:<br> --- \My Music\$if(&lt;artist&gt;,&lt;artist&gt; (&lt;year&gt;'''$'''),Unknown)\&lt;track&gt;<br>  


|-
|- style="background:#f4f4f4;"
| $Len(string)  
| $Len(string)  
| Returns the length of string. Useful with $If() function.
| Returns the length of string. Useful with $If() function.
Line 220: Line 220:
* [[{{WebHelp:Links|Converting Formats}}|Converting Files]]
* [[{{WebHelp:Links|Converting Formats}}|Converting Files]]
* [[{{WebHelp:Links|Exploring Tracks}}|Synchronization]]
* [[{{WebHelp:Links|Exploring Tracks}}|Synchronization]]
* [[{{WebHelp:Links|Changing Filenames}}|Auto-Organize]]
* [[{{WebHelp:Links|Changing Filenames}}|Auto-Organize/Organize Files]]
* [[{{WebHelp:Links|Auto-Tag from Filename}}|Auto-Tag from Filename]]
* [[{{WebHelp:Links|Tag from Filename}}|Auto-Tag from Filename]]


{{WebHelpFooter}}
{{WebHelpFooter}}

Latest revision as of 15:33, 4 August 2025

Wiki Home > MediaMonkey 2024 Help > Reference Information > Masks to Configure Folder and Filename Formats



Introduction

When ripping, converting, syncing, or organizing files, you can select the format in which the folders and filenames will be created. When tagging from filenames, you can select what tags will be updated based on the folder/filename format. This section describes Folder and Filename Masks that allow you to define these formats.

Example of Tag from Filename Mask
Example of Tag from Filename Mask


Concepts

Generally, there are 3 elements to configure when choosing a Destination Mask:

  1. Directory: This is chosen using the directory browser button (e.g. C:\My Music).
  2. Directory format: This is chosen using the 'masks' such as \<Artist>\<Album>\ . e.g.
    C:\My Music\<Artist>\<Album>\ would result in
    C:\My Music\U2\The Joshua Tree\
  3. Filename format: This is chosen using the 'masks' such as \<Track #> - <Title> . e.g.
    C:\My Music\<Artist>\<Album>\<Track #> - <Title> would result in
    C:\My Music\U2\The Joshua Tree\1 - Where the Streets Have No Name.mp3

Similarly, when using Auto-tag from Filename, 2 elements are configured to read the filename format:

  1. Directory format: e.g. \<Artist>\<Album>\ would read \My Music\Beatles\White Album\Song.mp3 and set Artist field to 'Beatles', and Album field to 'White Album'
  2. Filename format: e.g. \<Artist> - <Title> would read \U2 - God and set Artist field to 'U2' and Title field to 'God'


Mask Reference

The table below describes most of the commonly used characters and fields in a mask. To remap non-standard characters, see: How to remap characters for 'Organize files...'

Mask Function
' ' (space) A space in a mask appears as a space in the path/filename that is written. Note that spaces automatically disappear in case they are in the beginning or end of a filename.
'-' A dash in a mask appears as a dash in the path/filename that is written.
'\' A slash following a mask element causes a directory to be created.
'.\' A .\ at the beginning of a mask causes whatever portions of the mask that follow to be written in the same directory as the source file(s). For example, a mask of C:\My Music\<Artist> - <Title> would write tracks to C:\My Music, but a mask of .\<Artist> - <Title> would write the new filenames into the directories from which the source files originate.
<Added> Writes the Library Added field to a directory or filename (depending on whether it is followed by a '\')
<Artist> Writes the Artist field to a directory or filename (depending on whether it is followed by a '\')
<Album> Writes the Album field to a directory or filename (depending on whether it is followed by a '\')
<Title> Writes the Title field to a directory or filename (depending on whether it is followed by a '\')
<Genre> Writes the Genre field to a directory or filename (depending on whether it is followed by a '\')
<Disc#> Writes the Disc Number field to a directory or filename (depending on whether it is followed by a '\')
<Track#> Writes the Track Number field to a filename (assuming it is not followed by a '\')
<Year>, <Date> Writes the Year field to a directory or filename (depending on whether it is followed by a '\')
<Original Date> Writes the Original Date field (as Year) to a directory or filename (depending on whether it is followed by a '\')
<Bitrate> Writes the Bitrate field to a directory or filename (depending on whether it is followed by a '\')
<Album Artist> Writes the Album Artist field to a directory or filename (depending on whether it is followed by a '\')
<BPM> Writes the Beats Per Minute field to a directory or filename (depending on whether it is followed by a '\')
<Composer> Writes the Composer field to a directory or filename (depending on whether it is followed by a '\')
<Custom X> X can have a value between 1 to 10. Writes 1 of the 10 Custom fields to a directory or filename (depending on whether it is followed by a '\'). Example: <Custom 2>.
<Podcast> Writes the Podcast name to a directory or filename (depending on whether it is followed by a '\')
<Ignore:X> Ignores x characters in the path. Used only for Tag from Filename.
$First(<'Field'>,count,skip) Limits the number of values for multiple definition fields to count, optionally skipping skip values. For instance:
<Genre> would yield: Rock;Pop;Acoustic
$First(<Genre>) would yield: Rock
$First(<Genre>,2) would yield: Rock;Pop
$First(<Genre>,1,1) would yield: Pop
<'Field':n> Can be used in conjunction with any of the above mask elements in order to force alphabetic fields to a specified length or to pad alphanumeric fields. For instance:
C:\My Music\<Artist:1>\<Artist>\<Album> - <Track #> - <Title> which would yield C:\My Music\A\Abba\Gold - 2 - Fernando.mp3 , useful for creating alphabetized directories.
<Track#:2> would yield 07 (for Track=7), and would yield 153 (for Track 153)
Numeric fields are not truncated: e.g. <Year:3> would yield 1940 (for 1940);
  The exception being: <Year:2> would yield 40 (aside from this specific field and value, numeric fields are not otherwise truncated)
Note: For text fields, the resultant characters start from the left. For numeric fields, the resultant digits start from the right. If n > the number of characters in the field, then the resultant path is padded with spaces or 0's depending on whether the field is text or numeric.
<'Field':-n> Same as above except that if n > the number of characters in the field, then the resultant path is padded with spaces or 0's (depending on whether the field is text or numeric) from the opposite side.

<'Field'@n>

Creates alphabetical directories grouped in sets of x letters. For example: C:\My Music\<Artist@3>\<Title> would create directories with all Artists beginning with ABC, DEF, GHI, etc.

$RemovePrefix(string) Removes a prefix from a string. e.g. $RemovePrefix(<Artist>) changes 'The Beatles' -> 'Beatles' . Prefixes are configured in Tools > Options > Library > Appearance > Ignore prefixes.
$MovePrefix(string) Moves a prefix to the end of a string. e.g. $MovePrefix(<Artist>) changes 'The Beatles' -> 'Beatles, The'. Prefixes are configured in Tools > Options > Library > Appearance > Ignore prefixes.
$Group(string,integer) Groups the first letter of the string into sets of letters of length specified by (optional) integer parameter. e.g. \$Group(<Artist>,2) for 'U2' would yield \UV (similar to <Artist@2>.
$Replace(string,what,by) Replaces all occurrences in a 'string' of 'what' by 'by'.
$Left(string,n) Returns the left n characters of string.
$Right(string,n) Returns right n characters of string.
$Mid(string,i,n) Returns n characters of string starting with character i
$RightFrom(string,i) Returns everything after the occurrence of The character i
$LeftFrom(string,i) Returns everything before the occurrence of the character i
$Pos(string,i) Returns the position of character i
$Trim(string) Returns string with spaces trimmed from the beginning and end of string
$Upper(string) Converts string to uppercase
$Lower(string) Converts string to lowercase
<Folder:n> This will recreate all folders in a source path except for the first 'n' directories. For example: C:\My Music\<Folder:2>\<Title> would create the source directory structure (without the first 2 directories in the source paths), followed by track title.
<Folder:-n> This will recreate only the last n folders in a source path. This is very useful when it is known that the source directory is homogeneously structured.
<Playlist> Writes the Playlist name for any Playlists that have been selected to a folder (assuming it is followed by a '\'). This mask can only be used for Sync, CD Burning and Exporting tracks.
<Filename>
<Filename:n>
This recreates the current filename, and can be used with modifiers to force the resultant text to a set length.
<Type> Writes the file type to a directory \My Music\MP3\U2... or \My Music\M4A\U2....
<Extension> Writes the file extension (in lower case) to a directory \My Music\mp3\U2... or \My Music\m4a\U2....
<Auto Number>
<Auto Number:n>
This creates a sequential number that can be inserted into the path. This is especially useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish for tracks in a playlist to be played in the order of the playlist (rather than alphabetical order). By default, 3 digits are used, though this is configurable.
<Random>
<Random:n>
This creates a random number that can be inserted in the path. It is most useful for inserting into the beginning of a filename when exporting to a device or burning to a CD and you wish to ensure that the tracks will be played in random (rather than alphabetic) order. By default, 4 digits are used, though this is configurable by setting n.
<Path> This recreates the same path and filename as the original source file(s), without the drive letter.
<Path:n> This recreates the same path and filename as the original source file(s), without the drive letter or the first n folders of the source path.
<Path:-n> This recreates the same path and filename as the original source file(s), without the drive letter or the last n elements of the source path.
$if(string criteria,truevalue,falsevalue)

This allows masks to be used conditionally. Several examples follow:
To use a mask if 2 fields or a field and a string are equal, use '=' . For example, in the case of an Album Artist differing from the Artist, you may want both to appear in the path:
--- \<Album Artist> - <Album>\<Track#> $If(<Artist>=<Album Artist>,,<Artist> - )<Title>

Similarly, other operators such as <,<=,>,>= and <> can be used. For instance, to return 80's for year 1984:
--- $If(<Year><1990,80's,$If(<Year><2000,90's,2000's))

To use a mask if a field isn't empty, just enter a string without any criteria'. For example:
--- D:\My Music\$If(<Artist>,<Artist:1>,None)\<Artist>$If(<Album>, - <Album>\,)<Title>
--- \$If(<Artist>,<Artist> - ,)$If(<Album>,<Album> - ,)$If(<Track#>,<Track#> ,)<Title>

Note: Make sure to precede all control characters such as ')' or ',' with '$' if you wish them to appear as normal characters. For example:
--- \My Music\$if(<artist>,<artist> (<year>$),Unknown)\<track>

$Len(string) Returns the length of string. Useful with $If() function.
$Assign(variable,value) and $Use(variable) Allows variables to be used several times in a mask, e.g. '$Assign(V,A)$Use(V)$Use(V)' produces string 'AA'. This is useful when a complex 'value' (i.e. a mask component) needs to be used several times within a mask.

Related


English


Additional Help: Knowledge Base | Forum | MediaMonkey Support | MediaMonkey for Android Help | MediaMonkey 5 Help | MediaMonkey 4 Help