iTunes: File Naming Convention

 
1. Description

    This is an attempt to define the file naming convention used by iTunes 1). I haven’t been able to find any authorized documentation from Apple on the subject. So this is simply a summary of my own findings.
While working on a play button for the OrangeCD 2) Crisp theme and CMI template , I needed to know how iTunes organized and named audio files. This is what I found.

1) iTunes is a digital jukebox created by Apple Computer, Inc
2) OrangeCD is a music collection manager created by Firetongue Software.

2. File name syntax

    fqn = <DBdrive>:\<DBfolder>\<ArtistFolder>\<AlbumFolder>\[[<VolNum>-]<TrackNum> ]<FileName>.<FileExt>

where

<DBdrive> = the drive letter of the drive where your audio collection is located
<DBfolder> = the name of the folder that contains your audio collection (including all parent folders)

<ArtistFolder> = the artist name (album or track artist name)

  •  if the Compilation CD option is checked in iTunes, <ArtistFolder> will be set to "Compilations"
  •  if the Compilation CD option is not checked, and the track artist name is different from the album artist name, <ArtistFolder> will be named after the track artist name
  •  in all other cases the abum artist name will be used
  •  if the chosen artist name exceeds 40 characters, the exceeding characters will be dropped
  •  a leading or trailing dot (.) will be replaced with an underscore (_)
  •  'illegal' characters will be replaced with an underscore (_) – see separate section on How iTunes handles ASCII characters
<AlbumFolder> = the album title

  •  if the album title exceeds 40 characters, the exceeding characters will be dropped
  •  a leading or trailing dot (.) will be replaced with an underscore (_)
  •  'illegal' characters will be replaced with an underscore (_) – see separate section on How iTunes handles ASCII characters
<VolNum> = the album volume number

  •  the volume number is only included if the album is part of a set (defined by setting the second Disc number field to a number greater than 1), and the iTunes option Create filenames with track number is checked
  •  if included, the volume number will be followed by a dash.
    Example: '2-01 Your Song.mp3'.
Note that iTunes does not use a leading zero in the volume number.

<TrackNum> = the track number
  •  the track number is optional, and only included if the iTunes option Create filenames with track number4) is checked
  •  if the track number is included and below 10, iTunes will add a leading zero (01, 02,....09) to the number
  •  if included, the track number is always followed by a space.
    Example: '01 Help!.mp3'.
<FileName> = the track title
  •  if the track title, including volume and track number (when applicable), exceeds 36 characters, the exceeding characters will be dropped
  •  a leading or trailing dot (.) will be replaced with an underscore (_)
  •  'illegal' characters will be replaced with an underscore (_) – see separate section on How iTunes handles ASCII characters
<FileExt> = the audio file type

Copyright © 2004 Juventas. All rights reserved.

3. Screen shots

   
Figure 1: iTunes: Edit | Preferences | Advanced (tab)

   
Figure 2: iTunes: CD Info (right-click CD source, select Get Info)

   
Figure 3: iTunes: Edit | Preferences | Importing (tab)


Copyright © 2004 Juventas. All rights reserved.

4. How iTunes handles ASCII characters

    The following characters are considered 'illegal' by iTunes, and will always be replaced with an underscore (_):

Char Description ASCII Entity Name
" (double) quotation mark 034&quot;
* asterisk 042&ast;
/ slash, virgule, solidus 047&sol;
: colon 058&colon;
< less-than sign 060&lt;
> greater-than sign 062&gt;
? question mark 063&quest;
\ backslash, reverse solidus 092&bsol;
| vertical bar 124&verbar;
low left rising single quote 130&lsquor;
double low quotation mark 132&ldquor;
left single quotation mark 145&lsquo; &rsquor;
right single quotation mark 146&rsquo;
left double quotation mark 147&ldquo; &rdquor;
right double quotation mark 148&rdquo;
´ acute accent 180&acute;
Ø capital O slash 216&Oslash;

There may, of course, be additional characters that iTunes replaces with an underscore. I have not tested the entire universe of UNICODE characters.
The play button in the OrangeCD CRISP_PLAY theme and the CMI_PLAY template works fine with all these characters, with the exception of the backslash (\) character.

iTunes does NOT replace any of these ASCII characters:

Char Description ASCII Entity Name
  space 032&sp;
! exclamation mark 033&excl;
# number sign 035&num;
$ dollar sign 036&dollar;
% percent sign 037&percnt;
& ampersand 038&amp;
' apostrophe, single quot 039&apos;
( left parenthesis 040&lpar;
) right parenthesis 041&rpar;
+ plus sign 043&plus;
, comma 044&comma;
- minus sign, hyphen 045&hyphen; &minus;
. period, decimal point, 046&period;
0-9   48-57 
; semicolon 059&semi;
= equal sign 061&equals;
@ commercial at sign 064&commat;
a-z   65-90 
[ left square bracket 091&lsqb;
] right square bracket 093&rsqb;
^ spacing circumflex accent, caret 094&circ;
_ spacing underscore, low line 095&lowbar;&horbar;
` grave accent 096&acute;
A-Z   97-122 
{ left curly brace 123&lcub;
} right curly brace 125&rcub;
~ tilde 126&tilde;
    127  
euro sign 128&euro;
    129  
ƒ small italic f, function of 131&fnof;
low horizontal ellipsis 133&hellip;&ldots;
dagger mark 134&dagger;
double dagger mark 135&Dagger;
ˆ letter modifying circumflex 136&710;
per thousand (mille) sign 137&permil;
Š capital S caron or hacek 138&Scaron;
left single angle quote mark 139&lsaquo;
Œ capital OE ligature 140&OElig;
    141  
Ž latin capital letter z with caron142&Zcaron;
    143  
    144  
o round filled bullet 149&bull;
- en dash 150&ndash; &endash;
- em dash 151&mdash; &emdash;
˜ small spacing tilde accent 152&tilde;
trademark sign 153&trade;
Š small s caron or hacek 154&scaron;
right single angle quote mark 155&rsaquo;
Œ small oe ligature 156&oelig;
    157  
ž latin small letter z with caron 158&zcaron;
Ÿ capital Y dieresis or umlaut 159&Yuml;
  non-breaking space 160&nbsp;
¡ inverted exclamation mark 161&iexcl;
¢ cent sign 162&cent;
£ pound sterling sign 163&pound;
¤ general currency sign 164&curren;
¥ yen sign 165&yen;
¦ broken vertical bar 166&brvbar; &brkbar;
§ section sign 167&sect;
¨ spacing dieresis or umlaut 168&uml; &die;
© copyright sign 169&copy;
ª feminine ordinal indicator 170&ordf;
" left (double) angle quote 171&laquo;
¬ logical not sign 172&not;
­ soft hyphen 173&shy;
® registered trademark sign 174&reg;
¯ spacing macron (long) accent 175&macr; &hibar;
° degree sign 176&deg;
± plus-or-minus sign 177&plusmn;
² superscript 2 178&sup2;
³ superscript 3 179&sup3;
´ spacing acute accent 180&acute;
µ micro sign 181&micro;
paragraph sign, pilcrow sign 182&para;
· middle dot, centered dot 183&middot;
¸ spacing cedilla 184&cedil;
¹ superscript 1 185&sup1;
º masculine ordinal indicator 186&ordm;
" right (double) angle quote 187&raquo;
¼ fraction 1/4 188&frac14;
½ fraction 1/2 189&frac12; &half;
¾ fraction 3/4 190&frac34;
¿ inverted question mark 191&iquest;
À capital A grave 192&Agrave;
Á capital A acute 193&Aacute;
 capital A circumflex 194&Acirc;
à capital A tilde 195&Atilde;
Ä capital A dieresis or umlaut 196&Auml;
Å capital A ring 197&Aring;
Æ capital AE ligature 198&AElig;
Ç capital C cedilla 199&Ccedil;
È capital E grave 200&Egrave;
É capital E acute 201&Eacute;
Ê capital E circumflex 202&Ecirc;
Ë capital E dieresis or umlaut 203&Euml;
Ì capital I grave 204&Igrave;
Í capital I acute 205&Iacute;
Î capital I circumflex 206&Icirc;
Ï capital I dieresis or umlaut 207&Iuml;
Ð capital ETH 208&ETH;
Ñ capital N tilde 209&Ntilde;
Ò capital O grave 210&Ograve;
Ó capital O acute 211&Oacute;
Ô capital O circumflex 212&Ocirc;
Õ capital O tilde 213&Otilde;
Ö capital O dieresis or umlaut 214&Ouml;
× multiplication sign 215&times;
Ù capital U grave 217&Ugrave;
Ú capital U acute 218&Uacute;
Û capital U circumflex 219&Ucirc;
Ü capital U dieresis or umlaut 220&Uuml;
Ý capital Y acute 221&Yacute;
Þ capital THORN 222&THORN;
ß small sharp s, sz ligature 223&szlig;
à small a grave 224&agrave;
á small a acute 225&aacute;
â small a circumflex 226&acirc;
ã small a tilde 227&atilde;
ä small a dieresis or umlaut 228&auml;
å small a ring 229&aring;
æ small ae ligature 230&aelig;
ç small c cedilla 231&ccedil;
è small e grave 232&egrave;
é small e acute 233&eacute;
ê small e circumflex 234&ecirc;
ë small e dieresis or umlaut 235&euml;
ì small i grave 236&igrave;
í small i acute 237&iacute;
î small i circumflex 238&icirc;
ï small i dieresis or umlaut 239&iuml;
ð small eth 240&eth;
ñ small n tilde 241&ntilde;
ò small o grave 242&ograve;
ó small o acute 243&oacute;
ô small o circumflex 244&ocirc;
õ small o tilde 245&otilde;
ö small o dieresis or umlaut 246&ouml;
÷ division sign 247&divide;
ø small o slash 248&oslash;
ù small u grave 249&ugrave;
ú small u acute 250&uacute;
û small u circumflex 251&ucirc;
ü small u dieresis or umlaut 252&uuml;
ý small y acute 253&yacute;
þ small thorn 254&thorn;
ÿ small y dieresis or umlaut 255&yuml;
Not included: ASCII 127,129,141,143,144,157


Copyright © 2004 Juventas. All rights reserved.
iTunes is a registered trademark of Apple Computer, Inc.
OrangeCD is a registered trademark of Firetongue Software.

 
 Document version 1.13 (2004-08-30)   Email: mail@juventas.net URL: http://ocd.juventas.net