In the spotlight: HOWTO: Move your iTunes music while preserving library data (when you don't let iTunes manage your music library)

HOWTO: Move your iTunes music while preserving library data (when you don’t let iTunes manage your music library)

iTunes desktop iconIt all depends on whether or not you let iTunes manage your music library:

  • If you do, then moving your music while preserving library data (playlists, play counts, etc.) is pretty trivial and documentation provided by Apple has got you covered (check “Part 1” in the guide that follows).
  • If you don’t (which is the user group I belong to), things are a bit harder, and instructions on the Internet are pretty rare to find (took a lot of Googlin’). It’s basically a two-part process.

    Before we begin, let me state the obvious—keep backups (besides your music, don’t forget the library files—XML, ITL, etc.), more than one if possible. If after following my instructions something goes wrong and your music files and/or library are messed up, I shouldn’t be held responsible. Follow the instructions at your own risk, etc. For what it’s worth, I did what I’m describing here a couple of days ago and it worked without a hitch.

    UPDATE: It’s also important to note that this definitely works with iTunes 6 (the version that was current when writing this HOWTO). Numerous reports in the comments though, indicate that it also works with versions 7,8 and 9.

    So, with this out of the way:

    Part 1

    Music that you rip with iTunes is imported in the iTunes Music folder—that’s usually C:\Documents and Settings\Username\My Documents\My Music\iTunes\iTunes Music\. Same goes for podcasts that you download with iTunes (look for a folder named Podcasts in the aforementioned path. Here’s what you have to do to move those files:

    1. Go to EditPreferencesAdvancedGeneral. Click Change and choose a new path for your files—e.g. D:\Music\iTunes\.
    2. Quit iTunes.
    3. Open the iTunes Music folder, select everything in there (try a Ctrl+A) and copy it to the new location. As the “Help” page notes: “Do not drag the entire iTunes Music folder, only its contents.
  1. Restart iTunes and your moved tunes are automagically found.

    Copy files to iTunes Music folder when adding to library in iTunesIf you let iTunes manage your music library (in EditPreferencesAdvancedGeneral, the box “Copy files to iTunes Music folder when adding to library” is checked √) with the aforementioned method you’ve moved your whole library, so you can stop reading here.

    Part 2

    You’ve moved your iTunes podcasts and iTunes rips but what happens with the rest of your music that you have indexed with iTunes?

    First, a note. In C:\Documents and Settings\Username\My Documents\My Music\iTunes\ there are two important files (among other stuff):

    • iTunes Library.itl
  • iTunes Music Library.xml

    If you open the former with a text editor, you’ll just see garbage (not human-readable characters) so there’s nothing we can do with it. If you open the latter, you’ll see a nicely formatted XML file with references to the file paths for each of your music files.

    You may wonder: “why not move my music to the new location, edit the XML file to reflect the new paths, launch iTunes and go?” Because iTunes doesn’t actually read this file—it’s using the ITL file (which we can’t edit accordingly).

    But as Schmolle found out… if the ITL file is corrupted or damaged, then iTunes will revert to the XML file in order to rebuild it (and consequently, your library data). So the plan is to edit the XML file to reflect the changes in our file paths, and somehow damage the ITL file in order to get iTunes to rebuild it from our revised XML file. If this sounded a bit complicated, worry not—we describe the actions needed step-by-step below:

    1. Quit iTunes.
    2. Backup your iTunes Music folder—this contains your library data. Now that it’s relieved from your podcasts and iTunes rips it’s considerably lighter too, so do an additional backup or two just to be on the safe side. Do this. Now.
    3. Move your music files (those indexed by iTunes that are neither iTunes podcasts nor iTunes rips) from the old location (say, C:\Documents and Settings\Username\My Documents\My Music\Non-iTunes\) to the new location (say, D:\Music\Non-iTunes\).
    4. Open the “iTunes Library.itl” file. Select all text (Ctrl+A) and delete it. The file is now blank, with zero characters on it—save it. iTunes Library.itl’s filesize should now be 0 bytes. (This is important, as Schmolle notes, because some Unicode-aware editors—e.g. UltraEdit—may add invisible characters to the beginning of the file.)
    5. Open the “iTunes Music Library.xml” and do a global search and replace with your text editor of choice. (Search for the old path, and replace with the new path; a screenshot of how this is done in EditPad Lite, a freeware text editor that’s light and powerful, follows after the end of this list.)
    6. Save the XML file.
    7. Launch iTunes. A prompt with a progress bar will come up—iTunes is rebuilding your library. Depending on how powerful your computer is and the size of your music library, this may take a while. When this ends, iTunes will come up with a message saying that the library file was corrupted/damaged and it tried to rebuild things for you. Press “OK”, iTunes finally launches.
    8. Check to see if all your music and playlists are there, and if library data (play counts, etc.) has been preserved. (Hopefully everything’s fine.) You’ll also notice a couple of additional static playlists for your podcasts, videos, etc. UPDATE: Simon notes in the comments section:
      As a minor aside, this approach ‘loses’ the date and timestamp when the file was originally added. This instead becomes the date and time that the track was (re)added to the library during the rebuild. That said, while this slightly messes-up any ‘recently added’ playlists, it somehow maintains the correct sequence (i.e. the rebuild seems to occur in the same sequence in which the mp3s were originally added, so one can still sort the library/playlist by ‘date file added’ and see the newest ones at the bottom).
  1. You’re almost done.

    (EditPad Lite screenshot—click for larger size:)

    Search & replace in EditPad

    By almost we mean:

    • all the columns in iTunes have been resetted. You’ll have to re-select those columns that you want to be viewable for each playlist, and resize them if necessary.
    • your podcast subscriptions have been lost. Do the following:
      1. Show genre when browsingGo to EditPreferencesGeneral and see that “Show Genre when browsing” is checked √). Press the “OK” button.
      2. Choose EditShow Browser.
      3. Go to your Library. From the first column of the browser (the Genre one), choose “Podcast”. In the third column of the browser (Album) those albums you see are the podcasts you were subscribed to do. Click on each “album” (podcast), choose all of its “songs” (the podcast’s shows), and drag them to Podcasts in the Source column—see screenshot after the end of this list.
      4. Go to Podcasts, you’ll now see a collapsed entry for the podcast you just dragged and next to it a “Subscribe” button—click on it to re-subscribe to this podcast. (If you click the arrow to expand the entry you’ll see that all of the podcast’s shows that you dragged from the Library are there.)
  1. Repeat process for each podcast you want to re-subscribe to.

    (Screenshot that shows how to move podcasts from the Library view to Podcasts—click for larger size:)

    Move podcasts in iTunes

    You’re done, that’s pretty much it.

    Thanks to Schmolle—without his findings I’d have probably never figured that out. I just brought his guide a bit up-to-date, and added Part 1 and the podcasts section.

    If you’re on a Mac, the process should be similar except your “iTunes Library.itl” file is simply “iTunes Library” (without an extension). (UPDATE: Rich confirms that it works.)

    For those switching to Mac and wanting to carry their music and library data over, I’d like to know if the following works (i.e. AFAIK nobody’s tested this):

    1. blanking your “iTunes Library” file (on the Mac)
  1. bringing over your “iTunes Music Library.xml” (from the PC) revised with the updated filepaths (for the Mac)

    Finally, if you want to move your music from a “traditional” hard drive to a NAS (network attached storage) device, you may also want to read Simon’s comment.

    If you try it, let me know how it went. Furthermore, if you’ve got anything to add, or feel like sharing a relevant tip or two, leave a comment.


    • (June 27th, 2006) Added notes on NAS devices, lost “date added” timestamps.
  • (March 14th, 2008) Does the rebuilbing of the ITL file stuck? Do you have songs with Japanese/Chinese characters? If you answered “yes” to both questions, read llyse’s comment.

Before leaving the site, have a look at our most popular entries:

...more noteworthy entries here.

517 comments so far. (RSS)

  1. Great stuff! This will come in handy soon.

  2. Thanks Paul.

  3. When I got my new headphones, I realized that I can’t enjoy 128kbps mp3’s anymore. I needed to go quality to make my investment worth it. That meant FLAC, so I reripped all my CD’s to FLAC files, and then I remembered that iTunes doesn’t support that format, amongst others (.ogg, too.) So I searched around, and settled on MediaMonkey, which allows me to manage my large music collection.

    While it’s not as intuitive as iTunes, it’ll get the job done, at least until Songbird comes out.

  4. Oh Matt, you’re doing a killer job in the research department. MediaMonkey is probably my favorite app when it comes to organizing my music library—a huge array of music formats supported, plus scripts/plugins to extend the app’s capabilities. The latter takes the app to whole new level.

    By the way, if you want high-quality files and want to stay with iTunes, you could always go with the Apple Lossless format. It’s the result of Apple messing with FLAC (they’re pretty similar), but obviously with FLAC you’re giving the finger to proprietary formats.

    RE: Songbird… well, here you go.

  5. Just to let you know, works perfectly on a MAC!

    Thanks for the tips.


  6. Thanks for this! I finally got my iTunes library moved over to my new computer.

  7. Thanks, this’ll make a great bookmark. Just know it will come in handy some day.

  8. I moved my 20+ gigs of music to my daughters computer using the “drag and drop” method from a network folder on our wireless network. Unfortunately I didn’t have the “let iTunes manage the files” option checked on hers so it cataloged everything as being on the network drive and didn’t copy it to her hard drive. Unfortunately (again), I didn’t realize why it had done that so I simply copied all the files to the iTunes folder.

    Your method flawlessly let me get her up and running preserving playlists, “last added” list, etc. Everything was intact.

    I’ve done a LOT of research on how to fix my error and this is the most effective and succint description I’ve seen.

    One bit of advice for Windows users: use Word Pad, not Notepad for doing the “find and replace”, particularly if it’s a large .xml file. Mine was 7+ MB and Notepad totally choked on it. Word Pad handled it in about 3 minutes.

    Thanks again. Brilliant work.


  9. Thank you for the kind words, Chris—glad the article was of help!

    Also, thank you for the tip regarding WordPad.

  10. I have just sucsesfully transfered the library ratings etc etc from my PC to my new and wonderful MacBook Pro. But what I needed to do was to export the library in the file menu of the PC then do the editing of the XML file it generated to have the right URL for the Mac. Next I moved the music files and the newly edited XML file to the Mac. Deleted any prior XML files and the ITL file from the mac. when I opend the itunes in the mac nouthing showed so I hit file import and seleced the new XML file and Voila!

    Thanks for the help


  11. I was wondering where the sudden surge of emails with ‘thank you’ notes came from—now I know :)

    Kudos to you for a well written article, including the things that I never felt knowledgeable enough to write about myself.

    I’ll silently share the thank you’s lavished on you. Pity my own (freebie) hosting doesn’t allow for commenting facilities…

  12. Hey Schmolle, I really appreciate your comment. You are the one who should be thanked for coming up with this clever solution.


  13. This is exactly what i was looking for! I just reformated my computer and in doing changed the computer name from something random to my first name. Then of course windows doesn’t let me use my first name as the username cause it’s the computer name. Curses. So I to set my username to first+last and as such change the path to my music.

    I have been looking all over for how to get the data into itunes from the XML and you finally gave me the answer. Thanks so much!

  14. This is great!

    I needed to move my mp3’s from a Maxtor to a Yellow Machine (a superb 1 terrabyte RAID5 drive – see and iTunes was preventing me because it viewed the Yellow Machine as a separate ‘machine’.

    (This seems to be because the Yellow Machine operates as a ‘server’ connected by 10/100 whereas iTunes viewed the Maxtor as a HDD with a letter like H:\ or whatever, because it hung off a specific PC via USB2.0 or Firewire, and thus Advanced -> Consolidate library will work with the Maxtor but won’t work for the Yellow Machine.)

    By moving the mp3’s to the Yellow Machine, and using this hack to re-point iTunes to the new location, I can now use iTunes on all machines on my home network to play from the ‘server’ drive … even a laptop in the garden via WiFi, which beats even AirTunes!

    As a tip, it is useful to pick one track to determine the format for the source and destination before launching-in headlongt.

    Hence consider this approach:

    1. Pick one track (e.g. go into iTunes, sort the library by artist, and pick an obscure artist for which you only have one track)

    2. Quit iTunes, and use explorer to copy from the source folder (for me H:\My Music) the FOLDER for this artist (i.e the chain of artistname -> albumname -> trackname.mp3) over to the destination drive

    3. Open iTunes and use File -> Add file to library to add the track from the dsetination drive into the iTunes library (it will appear to be duplicated, but right-click -> Get info on each entry should give different locations: one source, one destination)

    4. Quit iTunes, backup the xml and ita files as described above, and use Wordpad to empty the ita file to zero bytes as described above

    5. Then use Wordpad to look at the xml library and find the two entries of the chosen artist (one on the source and one on the destination). In each case, once FIND has found the artist’s name, scroll down a few lines until you see the line describing the file’s location which you should write out on paper VERY VERY carefully. For example, for me the source was file://localhost/H:/My%20Music/... and the destination was file://localhost/YmXXXYYY/disk1/My%20Music/iTunes/... (where XXXYYY is the last part of the MAC address of my Yellow Machine)

    5. Go back to the top of the xml library (this is important, otherwise it won’t replace everything!) and use Replace All. For me that meant replace-all file://localhost/H:/My%20Music

    6. Save and quit Wordpad

    7. Open iTunes … and wait (a long time if you have thousands of mps3) and hit ‘ok’ when it tells you the library was corrupt and needs to be rebuilt

    And hey presto, it all works, and all the rating info etc. is preserved.

    As a minor aside, this approach ‘loses’ the date and timestamp when the file was originally added. This instead becomes the date and time that the track was (re)added to the library during the rebuild. That said, while this slightly messes-up any ‘recently added’ playlists, it somehow maintains the correct sequence (i.e. the rebuild seems to occur in the same sequence in which the mp3’s were originally added, so one can still sort the library/playlist by ‘date file added’ and see the newest ones at the bottom).

    Again, thanks. (And long live Yellow Machines!)

  15. Woah, Simon that’s what I call a thorough and helpful comment.

    I went ahead and added your last paragraph (the one regarding dates and timestamps) in the article—I had missed that, thanks for noting it.

    I’ve also included a link to your comment for those wanting to move their music to a NAS (network attached storage) device, such as the Yellow Machine you’re using.

    Much appreciated—thanks for sharing your tips!

  16. I store our 20GB+ music on a Buffalo station from which all 4 family members access the music for their personal iTunes. The Buffalo station crapped out, but luckily I had backed up all the music on a second Buffalo. I went through all the Apple help files and BBS messages looking for a way to have the iTunes point to the new location, but couldn’t find one till I came across this site. I tried this and it worked perfectly. Thank you!

  17. Wow. I was fighting over a solution to my problem for awhile. Went over to the Apple forums and someone pointed me to this article, and I must say, it worked like a charm. Thanks for taking the time to work out this nice tip…

  18. Found a neat little script for mac users to use after doing this tip. Don’t know if it’ll work on windows, but you can give it a try. It lets you change the view options for any/all your playlists (you can choose whatever playlists you want) to mirror what your Library’s options are. Came in very handy for me after moving my music.

  19. Adam: thank you both for your kind words and the link to the script—our Mac friends will appreciate it.

  20. hello, I have tried this and it works! Thanks for the help. But I am not really completely satisfied with this as it was posted that the timestamp will be lost. that’s what also want to preserve. do you happen to know a program or a script that would do the same thing but it would also preserve that timestamps. I’ve tried to use iTune Library Updater and hopefully it would work, but it didn’t. I was hoping that a program would actually hack the ITL file and take the managing the stuff from there. I am assuming that the programs that are currently available are just scripts like applescript. Is it possible to create a script that would:

    1. search for the file that are dead (! sign)
    2. check what is the current location information of the file in the ITL file
    3. Modify that information.

    hope that someone has created such program because I have a habit of reformating my hardisk every year. why? there is no registry cleaning program that is effective as reformating your hardisk. :)

  21. Hey, I had to make a laptop switch and up until now, I’ve been struggling with how to reestablish all of my play counts and playlists. I’d used a program called sharepod but it didn’t do everything I’d hoped it would. I had my old iTunes library file from the old laptop, though and I knew that there was some way that I could get iTunes to use that one instead of the new one it had created. Copying my old itl and xml files in place of the new ones and then erasing the contents of the itl file did the trick. Thank you so much. I now have my beloved playlists and playcounts.

    I do have one problem. I believe that it was caused by sharepod which was what I used to transfer the music from my iPod to the new laptop. I had some song titles and artists in Hebrew font and they’ve all been reversed so that they now read left to right (incorrectly). I was wondering if you had any ideas about how to correct this or could point me in the right direction for some Hebrew text support for iTunes. I know that this is a somewhat obscure request and somewhat of a shot in the dark but if you can help…

    ...and if not, thanks so much for your helpful post.

  22. Daniel: I couldn’t find anything related to iTunes and Hebrew text support—sorry!

  23. Fantastic! I’d been all over the web trying to fix this and finally this solution did the trick! Many thanks for the post.

  24. Migrating iTunes from PC to Mac and preserving play counts:

    I don’t allow iTunes to organize my music and needed to transfer library and playlists from Win to Mac.

    Installed iTunes on my new Mac, copied all of my song files from the iTunes Music folder on the PC to the new location on the Mac.

    Opened the PC iTunes Music Library.xml and did a Find and Replace as directed in Part 2 above, where I searched for the PC location and replaced it with the Mac location. I then saved this file on my Mac.

    I then deleted the iTunes Library.itl and iTunes Music Library.xml on my new Mac, moved the edited .xml file to the directory where the deleted file was. I then copied the PC iTunes Library.itl file to that same Mac directory and—voila!—when I opened iTunes on the Mac, all of my songs, playlists, counts and dates played where successfully brought over from the PC to the Mac.

    Since I want my Mac (@work) and my PC (@home) to have the same playlists and counts, will attempt to use my iPod to keep both lists update. Will advise if this experiment works.

    (Konstantino: Evharisto for the great site!)

  25. gShash, Cams and everyone: thank you for your kind words, I appreciate them.

  26. HI All:

    I have been reading the rather exhaustive solution above and have been unable to find an answer to my current problem. I would like to apologize in advance for posting an issue not directly related to the above but a by problem I have encountered as a product of a process in line with the general theme in this thread.

    I have posted the following on iLounge but with no results and unfortunately while I can play my music I can’t back anything up. I hope that with the added knowledge base of the readers of this thread my songs can be found (which really are there!). Thanks.

    HDD was getting full so I purchased an external drive and followed itunes/support instructions:

    1. Moved the itunes music folder to the external drive. [all 43.7gb].
    2. Edit—> Preferences—> Advanced > changed the location to the external folder
    3. Clicked yes to keep music folder organized be itunes

    1 week later: I wanted to backup the external drive to another external drive and began using that drive instead (I did make the change to iTunes by repeating steps 2 & 3). Every time I loaded itunes the computer would look for the external drive (assuming it to be mapped to the same drive letter) and if it was mapped to a different letter, it would show excalamation mark in the itunes folder. To remedy this I assigned a drive letter to the external drive as explained here.

    At the office I dock the tablet pc and plug in the external drive (the ibm dock covers the usb port) so I have to plug it into another port. This required telling iTunes where the external drive is (repeating steps 2 & 3). Unfortunately, whilst doing this exercise I might have clicked and stopped the keep itunes folder organized process mid-way. I still see all the songs in iTunes, however in the external drive when I open the folder only albums beginning with letters A & B are listed, with only about 1/2 of the ones beginning with B.

    The size of this folder is 1.7 mb versus the iTunes library which is 43.7gb

    I would like to move the folder to antoher drive and also back it up and/or share within the allowed 5 authorized computers, however with Windows Explorer only recognizing 1.7gb I am at a loss.Currently am not panicking because I know its somewhere as I am able to play the songs. I randomly chose tracks beginning with differnt letters of the alphabet and they all play fine. I also am able to sync my GV 60gb ipod and get new playlists. I would really appreciate help on this and have tried in vain to find the solution in these forums. Thanks. PLEASE HELP: been almost 2 weeks since I have been able to use itunes as I have no idea where it will store the files.

    I checked the external disk (Maxtor II) and found that about approx. 40gb is accounted for. I.E:

    Free Space: 86.5
    Total Size: 233

    Checking each folder within the drive I find less than 100 being used by all current files. I do have a month old backup on another drive (Western Digital 250gb) which contains 43 gb of music (7,000 files) of which I can only see a handful in the folder I currently sync with. Besides assigning a drive letter, and possibly stopping itunes in an activity (mentioned above), both of which I have tried to since correct (removed the drive letter signing and after changing the drive location in itunes/advanced I ran the short exercise (Which itunes does to account for all file locations) but still nothing. I cannot fathom what might be the issue! I have run disk check and disk defrag to no avail.

    PLEASE HELP. Shall I just copy the old on top of the new? If I do, will I permamently lose the 40gb of space? How might it affect my itunes library (playlists, albums, etc.) which is the most important thing here…

  27. Hello,

    A friend pointed me to the solution above and I just have a couple questions before I format my hard disk. I have a master and secondary hard disk on my computer. Whilst iTunes and Windows are installed on the Primary Drive, all of the music is on the secondary drive.

    When you insert a CD into iTunes, it usually imports the correct information from CDDB, but a mixed CD will be unrecognized, and sometimes the CDDB for a legitimate disc is incorrect. So, I use the GET INFO pages to edit all of this and set my music the way I like it. Upon reinserting that same CD, iTunes will display the preserved information previously entered. Where is this information stored (Such as track names, album title, etc. especially if you don’t import the music, just play it from the disc)?

    Also, when importing music, I will often have to edit all of the track numbers in the Album for them to appear in order.

    The point of all of this, is it is well overdue that I format my Master hard disk. The above method seems to preserve the playlists, but will it store the CD names?

    Also, when you edit the start and stop times for tracks (to eliminate long gaps of silence at ends of tracks, for example), will it preserve these START and STOP times?

    I have spent much time organizing my library, and I don’t want to go through and reedit all of the track start times, playlists, etc. I am not familiar with the iTunes jargon (counts…??), so sorry if I’m actually posing a redundant question. Will the above method give me the results I want? Will it restore CD names for mixed/compiled CD’s, and CD’s whose track information I have edited? Will it preserve start and stop times for tracks?

    Thank you all so much for your time,


  28. Ok, I’m not really helping here, but I have questions. For one, I just got a Mac Pro, and I had all my iTunes music on a PC at home and on a 4th gen. iPod. The way I went about transfering my songs was from my iPod. I downloaded TinkerTool, which allowed me to view Hidden files on the Mac. So I simply copied all my music from the iPod onto my Mac, then imported the music into iTunes. I had done this before on my PC, and it worked flawlessly. Now, when I tried it on my Mac, some of the songs in iTunes will randomly stop and skip to the next song. I go back to the song that skipped, and it skips at the same time as before. The songs do not skip on my iPod or on the PC iTunes library, only on my Mac. The whole song file is there, because if i skip past the point in the song where it “skips,” the rest of the song plays to the end. I also tried converting the song (already and AAC file) to AAC, but the newly converted song has an endpoint where the original song skips. Example: say a song is 2:35 long, and it skips at 0:47. The converted song is only 0:47 long. Is there any way to fix this? Where there files corrupted upon uploading to my Mac? Does my iPod being formatted for Windows play any role into my scenario? And I’m not exactally sure how to go about the process of doing what everyone else is. Am I supposed to have my PC and Mac connected? Or do I use an external Hard drive? Sorry for being difficult/dumb. I just don’t want to have to upload every single CD again, or loose my music all together.

  29. ...was struggling to migrate my iTunes collection from PC to my brand new iMac…till I found this site. Works great. Thanks!

  30. You sir (Schmolle too =D), are a complete legend. I think you have just saved me about a months worth of trouble.

  31. I managed to move the library data with this great guide, but all track ratings were removed from the newly created XML file after importing the library.
    Is it somehow possible to maintain the ratings also?

  32. blubalu: ratings are supposed to be preserved—maybe you did something wrong in the process?

    Jamie, Glenn: thank you for the kind words.

  33. Theres no need to mess around with the ITL file.

    1) Copy your XML file to a convenient location, anywhere will do as long as its not your default itunes folder. Keep a back-up or two in case you screw up.

    2) Replace the paths in the XML file with your preferred text-editor as detailed above.

    3) Open itunes and go to file—> import. Find and choose your edited XML file.

    For some reason, the XML file uses regular slashes ( / ) in the paths as opposed to the backslash ( \ ) that is used in windows explorer. In other words, use regular slashes ( / ) when replacing the paths or else it wont work.

  34. Great information. Thanks for sharing it here.

    My question relates to limitations of size of library in Tunes. I remember reading a long time ago that there were issues. But I haven’t read much about that lately. Has it been resolved?

    I see that others have large collections, which I am guilty of. Over the 40 Gig mark. Is there any danger in having a library that size? Is there any way to create more than one library?

    Any information would be greatly appreciated.

  35. Eli: it’s said that iTunes can be a bit difficult to manage when the library’s size gets a big too much, but from what I can tell, it’s not that the app won’t launch or something—I know several people with enormous libraries (40GB+), using iTunes.

    RE: using more than one library. AFAIK, there’s a way to do so, but only if you’re on a Mac—check out Libra.

  36. THANKS (From chile) it works,

    From a PC to Ibook G4 the to a Ext. HD

    Thanks again

  37. Sorry for my stupidity but I don’t manage this.

    This is my “challenge”: My Music is located on a network drive. That’s a problem if I work offline. As iTunes does not offer an option to specify the iTunes Library path.

    This is what I want to do: Install iTunes with the network connected and then migrate the Library (there are no music files yet) to a local drive.

    But that does not work for me. I played around with you article ant tested with some music files. The files are stored correctly on the local hard disk drive but the Library used by iTunes is still on the network drive.

    This is really driving me crazy. The first mission – storing the files locally – is accomplished. But that makes no sense for me as long iTunes uses the XML/ITL from the network.

    Would be great if someone has the same problem and solved it. ;-)


  38. This thread details a very clean way of moving the library without losing metadata. File > Export library, then in the new location, File > Import. Done. :-)

  39. Eric: that’s if you let iTunes manage your music library. This HOWTO is about when you don’t let iTunes manage your music library.

  40. Thanks for the helpful information. As it turns out this also solves another problem that has been plaguing me. When subscribed to a podcast, if there is an error downloading an episode which subsequently has to be deleted, you can never get it back into the listing of episodes to download. By following the instructions here, not only does it not lose your previously downloaded episodes – it resets your episode listing to allow a re-download. Excellent!

    Thanks again for the concise directions.


  41. I see that after copying iTunes and my music library to my external drive they’re synchronized automatically. Part of the point of me getting this drive was so I could delete some large movie files off my computer and just access the drive when I wanted to watch them. Do I need to delete iTunes from my internal drive and just hook up the external when I want to watch? Or is there some way to make them so they aren’t in sync so I can delete movies and TV shows from my internal drive yet keep the music on the internal drive, yet have everything on the external? Please help

  42. Thank you for the HOWTO, it was exactly what I was looking for. I do, however, have one question which might need to be addressed in your article as well. What will happen if you have iTunes set to automatically sync the library with your iPod? After you moved the location, will iTunes think your iPod is still up-to-date or will it start copying all files to the iPod again? With 40GB it will take a long time…

  43. Also…
    I just noticed there a ‘Previous iTunes Libraries’ folder in the iTunes folder containing a different .itl file again. How big is the chance it will use that file when the main .itl file is corrupted?

  44. I couldn’t wait for an answer ;-)
    Here are some findings using iTunes 7.0.2: – iTunes version 7.0.1 and later has ‘Gapless Playback’ support. When you performed the steps to move your music, all file will be analysed again afterwards. – I’ve got a ‘Recent Changes’ smart playlist which has two rules: ‘Date Added’ and ‘Date Modified’ both set on ‘is in the last 7 days’. The playlist works fine and doesn’t list the complete library. – From What are the iTunes library files? ‘If everything goes fine during your upgrade to the latest version of iTunes, you can delete the older iTunes Library files.’ Just in case iTunes starts using the backup .itl file after the move, you might want to move/delete/rename the ‘Previous iTunes Libraries’ folder. – For some strange reason the new .itl file is about 0.5MB bigger than the old one (5539 audio files in the library). – And here it comes… If you have iTunes set to automatically sync the library with your iPod… ALL audio files will be deleted from your iPod and transferred to it again… :-(

  45. For whatever reason, I tried this with Itunes 7.0.2 on a Mac, and it didn’t work. I was trying to get it to accept files on a newly-installed Maxtor NAS server that I got just for storing music. What did happpen instead is that Itunes ignored the XML file, and just created a new, blank library based on the default directory. The advice contained on this page to backup files is excellent for occurrences like this.

    Pardon a mini-rant, but this is an excellent example of how Apple sometimes tends to treat users like idiots. Itunes works like a charm if you follow standard procedure, but if you want to do something slightly different like storing files on a networked drive—something I imagine many people want to do for perfectly innocent reasons—Itunes will fight you every step of the way.

  46. Alex: these instructions have been written with iTunes 6 in mind.

    I don’t know how well they apply to iTunes 7.

  47. I have been wanting to move my music files for a year but couldn’t find instructions for people who didn’t want to let iTunes manage their music. Your instructions worked perfectly with 7.0.2 for Windows. Thanks for the great article!

  48. Thanks, that’s good to know!

  49. Windows user are lucky I guess. It doesn’t work on the Mac with iTunes 7.0.2.

    Good reason for spring cleaning ehh.. rebuilding my playlists.

  50. You are a gentleman and a scholar. Thank you so much for this.

    I’ve always understood this couldn’t be done. But I’ve just bought myself a Mac so I thought I’d search again and hey presto, the Windows to Mac conversion works like a dream. iTunes 7.0.2 on both Windows and Mac.

    I am in your debt !

  51. The Beansprout: thank you very much for your kind words, I appreciate them.

    Glad the HOWTO worked out for you!

  52. I ended up having to delete my library, and dragging the songs from the new NAS drive location into Itunes. I lost my playlists and ratings, but at least it now works like a charm.

    ... almost. With my really huge song files, the lossless ones, it is occasionally skipping. The smaller MP3s play fine. I’m using a Maxtor NAS drive and an Airport network… is there anything I could do to eliminate this problem?

  53. Looked for days for a way to move iTunes library without Consolidation ….and yours is the only POST…Thank You !!!

  54. Rich: you’re welcome!

  55. Ok, trying iTunes, because Quicktime upgrade insisted on loading it. On WinXP Pro. I’ve avoided it like the plague because I refuse to use proprietary DRM formats. But thought I’ll give it a shot with my .mp3s

    I keep a live USB backup drive and everynight I auto sync music, pics, and other important files and directories.

    So iTunes carefully found the duplicate backup drive and added all those files again. So every media file I own is in iTunes twice. Great, no wonder this thing is so popular.

    I’m sure I can blow the duplicate files out of the .xml file, but how do I keep the s/w from reading the backups again? Doesn’t seem to be a preference for identifying/restricting media locations.

    I know I’m almost off topic, but this seems like a knowledgeable thread, can somebody steer me in the right direction or to the appropriate resources?

    thanks brad

  56. Nice explanation.
    I had read about the damaged itl, but couldn’t figure it out. I wanted to preserve the playcount, dateadded, lastplaydate, so that’s how I found this artilcle.

    Anyways, I am going to write a program to sort out my music files by artists/cds and such but I have to move it first.

    I tried these with iTunes 6.x a while ago, and it worked but the dateadded field was reset to that day in all my files. I tried it today with iTunes 7.0.2, and it still resets them. I can’t edit the xml, because it won’t read it again.
    Has anyone found out a way to preserve the dateadded field?

  57. hi how do u download itunes on my i pod? can u pleez help me

  58. Thanks a bunch… it took me a while to find this page but theinformation was spot-on!

    Many backups later, I’ve got my DB moved to a different drive and back in order! Thanks a bunch!

  59. Just did this with iTunes 7.0.2 on a Mac and it worked fine, except it still changes all the date-added timestamps. Which basically means that it doesn’t work.

    Losing that bit of metadata isn’t acceptable, and I haven’t been able to find any solution that preserves it. The date-added timestamp is in the XML document, so there’s no reason it couldn’t be kept.

    The only solution I can think of is to use the old library re-locate each missing song file manually. But that’s just not feasible for a library of more than a few albums.

  60. Ross Brown: When most metadata is preserved and I make sure to note that some attributes (including the “date-added timestamp”) aren’t, how can this “basically mean that it doesn’t work”?

    Have you read the “Update” in Part 2, Step 8?

    This article delivers what it talks about, so I’d say it works.

  61. Okay, this is crazy. I was annoyed because the technique described above reset all the “Date Added” timestamps and it also lost all the album artwork previously downloaded through iTunes. In search of a new technique, I put my original library file back into place in the iTunes folder on the new volume and opened iTunes.

    When I double clicked a song to to play it, I didn’t get the “can’t find file” error message…it started playing! I did a get info on the file and it showed it located on the new volume. All my “Date Added” timestamps are preserved. All the album artwork is there.

    So I forgive you iTunes 7.0.2. You’ve got some smarts going on. I don’t know how this worked, but I did notice that that my “iTunes Music folder location” had changed in my iTunes preferences. Previously I’d been using a symlink in my home directory’s music folder to get iTunes to look for its files on a network volume, but now its set directly to the path on the firewire volume.

    After quitting iTunes, I opened up the iTunes Music Library.xml file and can see that the location string has been updated for the files I played, while others still show the old location. iTunes is being smart and looking for songs in the new location and updating its references. Awesome. iTunes is being smart!

    So to summarize: – I store my music outside of the iTunes Music folder. – I was storing my music and iTunes library files on a network volume and using a symlink to trick iTunes into thinking it was in my home directory. – I moved all the music files and iTunes directory to an external firewire drive. – After my “iTunes Music folder location” got changed to the location on the new firewire drive, iTunes is automatically looking for my music files, finding them and updating its database without overwriting any of the metadata.

  62. Sorry for not being clear, Konstantinos. The XML search and replace technique works as described in the article. When I say “it doesn’t work”, I mean it’s not the ideal solution because one important bit of metadata is still lost. If I’m losing some of the metadata, I might as well be losing all of it. I refer to the “Date Added” all the time so I need a solution that preserves that.

    Fortunately, I stumbled onto something that did that unexpectedly. I’m not exactly sure why it worked or if this is a new feature of iTunes 7, but I’ve got all my music on a different volume and the “Date Added” dates are unchanged.

  63. it worked! thank you very very very much.

  64. Ross Brown, when moving the files did you preserve the folders in the same way? and where did you leave the .itl and .xml?
    Because I want to reorganize my music too, and if iTunes will look around the folders for the song, then you’ve just solved my problem.
    And if I can change the song’s filename and it will find it too, that will be excelent.

  65. Wonderful! It works very well with iTunes 7.0.2. Great. Saved hours of work.

  66. In need of advice! Given the expertise in this blog, I thought someone might have some great suggestions.
    After buying a G5 iMac, I upgraded our old slot loading CRT G3 iMac to 10.3.9 and gifted it to my 10 year old iPod using daughter. We can’t easily network the older iMac (that’s another story, involving lightning and a fried Ethernet card). The problem is that music purchased through the iTunes Store can’t be played on the G3. I’ve tried importing the files into the G3 iTunes library and playing the songs through the iPod. In each instance, authorization fails because the machine is not networked. Are there any simple work arounds? I’ve also tried burning a CD of purchased songs, and these also required authorization to play. I realize that networking the old iMac using a USB wireless network is one way to go, but this is not an option at the moment.

  67. I downloaded ITUNES in my work computer. I had folders and songs in it. I moved and i got a new computer. When I installed ITUNES in my new computer and hookup my ipod with it, it says that i will erase all the songs (every thing) from my ipod and i have to start over. I dont wana loose my songs and data from my IPOD is there any way i can upload songs/data without lossing my old one. Please help(step by step will be help full)
    Thanks in advance.

  68. I don’t fully understand- do I do this from the computer I want to move my iTunes to, or from? And how does it exactly make iTunes move onto a computer on the same network?

  69. beautiful—i’d been looking for this info for weeks—great, and thanks!

    Jay, above—sounds like you want to do automatic iTunes management, and not mess around with XML files.

  70. what Ross Brown discovered is the following:
    If you move a music file iTunes will notice that an update the path in your library automatically (this is even the case if you move a file to the trash, iTunes will locate it there and still play that track)

    But: unfortenately this only works when you move a file within one volume

    so it doenst work if you move a file from your local harddisk to a network volume or your external harddisk and vice versa

  71. For those switching to Mac and wanting to carry their music and library data over, I?d like to know if the following works (i.e. AFAIK nobody?s tested this):

    1. blanking your “iTunes Library” file (on the Mac)
    2. bringing over your “iTunes Music Library.xml” (from the PC) revised with the updated filepaths (for the Mac)

    Worked just fine….. Thanks!!!

  72. I needed to update my iTunes file paths following my upgrade to Vista. (Have not seen Apple acknowledge this problem.)

    Your instructions worked perfectly. One month after installing Vista, I’ve got control over iTunes again.


  73. Hi

    im not sure if this has already been asked but ive got a whole bunch of songs that will play on itunes and then skip halfway through to the next song, but when i play them on windows media player they work fine got any suggestions.thanks alot.

  74. Much appreciate the helpful knowledge. Had been trying to Xfer library from old laptop to new one… all other sites leave out the consolidate library ” step… hence I’ve been left w/a massive playlist of my external HD…
    Thanks again!

  75. I am trying to move my iTunes from one PC (both WinXP) to another and not lose the library information. Can anyone tell me if the “Part 1” at the beginning of this thread works for iTunes 7.0? I have my iTunes-ripped music and iTunes store music in my My Music/iTunes folder, but most of it is in the root My Music folder. I can consolidate the songs if that’s what I need to do. I think iTunes “manages” my library…I add tag data and so on to the songs in both the My Music/iTunes folder and the My Music folder. I just don’t want to lose the library data that I’ve added in iTunes.

  76. iTunes on Windows

    The regeneration works for the Music library.

    Afterwards, it regenerates gapless and normalization (volume) at about 2 songs per second over 100mbit/samba or about 4 seconds per song over excellent signal 802.11g.

    Browser is under “View” rather than “Edit”.

    Podcast does not show up here, so they have to be manually resubscribed.

    I’m assuming Audiobooks would also disappear had there been any.

  77. Thanks alot! This was a great help.

  78. I am also having the problem on my Windows system where the itunes will halt in the middle of particular songs and skip to the next one. Any ideas?

  79. I think I solved this problem of particular songs “halting” in the middle of a playback. Create a new folder, called somthing very similar to the folder with the offending songs, copy all the first folder’s contents into the new one, go to itunes and delete the current versions of those songs, and recapture those songs into itunes. Worked for me …

  80. I’m trying to solve this problem with itunes and i’m wondering whether anyone can help – i have tried calling the Apple support phone number but to no avail.

    Most of my songs are located in the itunes folder but some are located in the shared folder (approx 2,000). One day, after playing a song in the morning the same song would not play in the afternoon. An exclamation mark appeared to the left with itunes saying that it was unable to locate song an would i like to manually locate. It transpired that all of the songs on the shared folder were apparently unable to be located. If I manually locate 2,000 songs this would take along time. If i transfer all the songs to itunes folder i lose all data that has been added to the library – most played/playlists etc. – which I really don’t want to happen.

    Is there anyway I can transfer these files & link them up to the library, keeping the itunes data, without doing each song individually? Any ideas would be greatly appreciated….

  81. Hey, I have a notebook computer that has a c drive and a d drive.Previously everything has always been stored on my c drive including all my itunes crap. The c drive was pretty full, and my computer crashed, so i had to restore everything on the computer. I’ve been able to transfer my itunes librabry from my ipod to my computer but I am trying to figure out how to transfer all of my itunes stuff to the d drive of the computer instead of the c drive, will this method work for that too without having it automatically copy to the cdrive?

  82. My old WinXP pc just died last week. I kept all of my audio files on a separate hard drive. I just used this tutorial to add all of my music back to iTunes version on Windows Vista Home Premium. I’m missing the Date Added feature, but I’m very happy to keep my ratings!!!

  83. I notice there is a Perl module called Mac::iTunes listed in CPAN that can read and write the ITL file. It would be great if someone wiser than me could write a Perl script to edit the ITL file instead of just destroying it, thus preserving all of the metadata.

  84. I tried doing this for my XP machine and with iTunes, and I had no luck. What iTunes did during the adding of the .xml file was completely rebuild the .xml file with the songs that the pathways were not affected by my hard drive crashing (which were only 30 of my thousands of song library). Becuase it rebuilt the library by itself, I no longer have the original .xml file to try again. Any thoughts…

  85. Hello,

    Thanks for the detailed advice. I tried it (on a Mac running iTunes 7.1.1), following your instructions to the letter, but when I opened iTunes, while it did recognize that the library was corrupt, it did not rebuild it from the xml file; rather, it simply created a new, blank library. Any advice on forcing it to use the xml file?

  86. Tried it again using Text Edit instead of Word, and it worked. I think Word was doing some funky kind of automatic formatting to the xml doc when I saved it. Thanks a lot.

  87. it works! god bless you

  88. just wanted to say that this method works on osx86 installs too.

    thanks for the steps, you saved me weeks worth of adding ratings to back my music!

    I thought I had lost years of ratings, playlists, play counts, etc. until I found this fix
    You’re a godsend

  90. Hi,

    I am looking for a similar method to move my entire Windows Media Player library to another hard drive, whilst retaining all the name changes and such that I have made.
    I am looking to format the hdd I am currently using for my music (and only my music) as FAT32 so I can install Ubuntu and mess about with it.
    I would really rather not have to go through all the songs I renamed once upon a time, and rename them again, it took long enough the first time!
    I played around with creating a new playlist with my whole library and editing it, but it only saved the location of the songs, and not any other data.

    If anyone has done this, or knows of a way I would be VERY appreciative :)


    oh, and a great article btw, it’s a shame I prefer WMP to iTunes :)

  91. hmm, I take back that last post, it seems in my reluctance to commit to transferring my music, I was blissfully unaware of the fact that WMP is rather clever and picks up any changes whilst leaving everything as it was!

    All hail WMP, king of music libraries :D

    In truth, I only prefer it over iTunes because it organises things sensibly, and makes finding things oh-so-easy. version 10, of course, 11 is even worse than iTunes in that respect! :)

  92. My xml and itl accidentally got deleted (my iTunes was on a shared computer, hence my desire initially to move it.) The library is intact…is there any way possible to salvage the scenario…perhaps get it off the iPod?

  93. You rule, works a treat, thanks you just saved my day!!!

  94. I have read this guide, but I have been thinking about addressing the problem from a completely different angle. I haven’t tried this, but would appreciate some feedback on whether this would work or not.

    I will eventually get a new computer and some day need to move my itunes library. I also fall into the category of not allowing itunes to manage my music. I have two hard drives and my music is stored on D:

    However, rather than using a text editor to edit the xml file and redirect itunes, my theory is that it would actually be easier to simply move my mp3s to an identically named location on the new computer. eg. old computer d:\mp3s—> new computer map new d: and add mp3 folder. this would seem to eliminate the need to edit the xml file and itunes would not have to “find” the files because they are in fact the same location as the original?

    comments and criticisms very welcome

  95. Peter: after some veeeery quick and superifical thinking, I can’t see why this wouldn’t work.

    Let us know how it goes.

  96. Thanks for the great info!

    Just wanted to add my experience to this thread. I just moved my iTunes library from Windows XP to my new MacBook Pro. I followed the suggestions here, but for me at least, it didn’t work. I’m using iTunes 7.1.1 (the latest version as of this writing) and when you wipe out the contents of the itl file, it doesn’t rebuild it, it just creates a new file with empty contents (after prompting you that it is corrupt). So here’s what I did, and it seems to work.

    First, I updated my Windows iTunes installation to the same version as the one on my Mac (7.1.1.). This was to ensure that the file formats would be compatible. I copied all of my music to an external hard drive. I opened the xml file into a text editor and replaced all the paths with the location on the Mac where I planned to store the files. I then copied the modified xml file to the external hard drive as well. Then I brought it over to the Mac, copied the music files to the predetermined folder, and copied the xml file to the ~/Music/iTunes folder (after deleting the existing one). Then I deleted the contents of the iTunes Library file as suggested. At first the automatic rebuild didn’t work because I blanked out the file using TextMate. On a second try, I used plain old TextEdit and that time it worked. It had to restore Gapless Playback Information, but all the files were imported into the library and all play counts and play dates were restored.

    Thanks so much!

  97. Oops, should’ve edited my comment more clearly before posting… In the first paragraph I state that it didn’t work. What I meant was it didn’t work at first because TextMate wasn’t effective at fully blanking out the file. Using TextEdit it worked just fine.

  98. Matt: thank you for the detailed wrap-up, appreciated! And glad the HOWTO was helpful!

  99. I am trying to do this hack but am running into problems due to the file size. I have 17,000 + songs in my library which weighs in at 99 Gigabytes (not sure that matters). the itunes music Library is 25 MB. I am able to open the XML file in Wordpad and Notepad. However, when I try to do a global search and replace as suggested above, the editor just craps out and crashes. I even went out and bought new RAM and increased my physical RAM from 1 Gig to 3 Gigs—same problem. Is there any way to trick the computer by adding virtual memory so that I avoid the crash? Anyone else run into this? The alternative is cutting and pasting 17,000 times—which given how much time I’ve been struggling with this, I might be finished with by now. Appreciate any suggestions

  100. Bruce: hmm, that’s a bummer. Maybe try a different text editor? EditPad Lite and Notepad2 are two excellent, free text editors.

  101. Konstantinos:

    Rock on!!

    Edit Pad Lite did the job in microseconds.

    You might want to include a notation above that if the iTunes library is humongous like mine to go straight to Edit Pad Lite— don’t stop at Notepad or Wordpad. Edit Pad opened the file instantly and did the S&R almost as fast.

    Thank You, Thank You.

  102. Bruce: excellent, nice that it did the job for you.

    Glad I could be of help.

  103. My problem is different, I think, than what’s been covered thus far: when I first installed iTunes it scanned my entire computer – that read my backup external drive, too! Therefore, my iTunes library has 2 copies of every music file I have, and I can’t load my iPod. (I have over 2000 music items…)

    I really need some way to purge all records/references in my iTunes library of the “J:\” items. Or, lacking that method, I need to reload (rebuild) the iTunes database while I have my external drive (J:) manually turned off. I tried to erase the .itl & .xml files and reinstall iTunes, but that failed to do anything.
    If I could find the record format of the .itl file I could probably write a C/C++ program to purge the J:\ items, but I’ve been unable to find that information. Even with that, I’d still have an almost impossible issue with the .xml file, since there’s no way I can see to “edit out” the packet references to J:\ ...
    I’d appreciate any thoughts on what I can do with this problem. TIA

  104. Mike: I doubt you’ll be able to discover the record format of the .itl file. Easily, at least.

    When you completely uninstall iTunes (both the app and the library data, etc.) and you re-install it with the external drive off, what you do you get when it scans your computer?

  105. Ohmigoodness!!! I’m so computer dumb I(but I’m blonde so I have a good excuse). I’m very scared to try this as what happens if i muck up and lose all my songs?My itunes has so many songs I’m sure it’s slowing down my PC laptop. Is there any way that I can put all the songs (that are stored on my PC for itunes) onto something that i plug into my laptop when I want to listen to itunes? hmmm did that make sense??

  106. Melissa: hmm, I see what you’re saying but it won’t work I think.

    I mean, of course you can move your songs to an external drive without losing all of the metadata, ratings, etc. on iTunes (that’s what this guide is about after all; make sure you backup everything first!).

    But if iTunes is consuming resources from your computer when it’s open due to the library size, it will do regardless of whether the songs are located on the internal drive or on an external one.

    Did that make sense?

  107. I have moved from a Mac to a PC (temporarly…!) and I don’t know what I’m doing wrong, but after the edited .xml file get’s imported all my files have been converted into radio streams. An example string in the .xml file looks like this now:
    Is this correct?
    the original looked like this:
    thx for any help!

  108. FrequentFlyer: you’ve got the Windows file paths wrong. The forward slashes (”/”) should be replaced with backward ones (”\\”).

  109. K – Wouldn’t I have to manually change all subfolders though, because only the mainfolder is consistent in its path(and therefore easy to change with find/replace)
    so (c:\music\) is clear to me. What about something like (c:\music\albums\50 Cent\Massacre\)?
    thx & sorry if this should be an ignorant question

  110. FrequentFlyer: hmm, good point.

    I don’t know how you could work-around that.

  111. I was wondering if someone can tell me how to make separate folders for separate genre or artist or movies??? i tried so many different ways on ITunes but it wont let me.

  112. I have done this four times now, both PC to PC and PC to Mac. Seems to have worked pretty much as stated every time. Thank you so much!

  113. hi, I came back in search of an answer for the DateAdded problem still. I sent an email to Apple about this too.

    Almost 5 months and no answer found for that. I’ll give it a while more, if not I’ll accept the loss. I can’t do what Ross Brown found, since I have music in different hard drives. (The purpose of this is to get them all together in one.)

    Nina, the only way to do separate folders is for you to manage your music, iTunes doesn’t separate it by genre. I think it does by artist/albums, but thats it.

  114. Nina: if your subfolders keep the same convention in terms of organisation (such using artist\album\trackname.mp3), then only the main folder’s path needs changing. If you cvhange your subfolder organiastion, then you would be bect off writing a simple program to change the records (trivial if no information is added to teh path which is not already in the libriary, but rather more difficult if you are relying in the ID3 tags in the files).

    Mike Copeland: I don’t know about C(++), but in Java it would be simple to write a program which would use the String.indexOf(String) method on the index to find instances of file://localhost/J:/, then using the same method find the … which immediately precedes the tag and delete all teh data from there to the next tag. this would be inneficent, and take a long time to run for a large file, but could be left to run without supervision

    To get the tracks off of an iPod, I believe that you can import the folder, asking iTunes to manage the files, meaning it will copy the files to the specified location on your HDD. Alternaltively, you could use PodPlayer to extract your entire iPod to any specified location, adn use your own subfolder path created from the tags on teh iPod.

    Personally, I prefer Winamp to manage my media library, because of the intuitve UI, low memory profile, and above all the use of a scratch playlist (which iTunes lacks and WMP handles so badly as to make it worthless), its skinnable nature. For sycnhronisong my iPod with my Libriry, I use vPod, which can be used to add music from anotehr computer to an iPod without needing to synchronise the rest of the library. It is also small enough to store on the iPod, and needs no registry entries

  115. Thank everyone, I will try it.

  116. I did the same thing Part I and Part II till replacing names in iTunes 7. But unfortunately it loses all its music from the new iTunes folder(E:\iTunes) . So when I added the ‘Add folder to Library ‘’ and selected ‘E:\iTunes’ everything comes into the same settings as before. I don’t have to do the genre thinhs to assign podcasts. But it automagically takes the podcasts to podcasts and music to music, and organised same as before !!!. One thing I had to do is just click subscribe on the subscribe button after each podcast in podcasts menu.

    But unfortunately It didn’t remember the video files which were Music Videos and which were TV Shows. It just took all the video files as Movies. So I had to do the annoying changing Movies to MusicVideos and TV Shows.

    Is there any simple ways to do that ?

  117. Just migrated from WinXP to Vista – iTunes 7.2 – this worked perfectly. I had some music in the iTunes library and lots in the “all users\my music” folders in XP. copied everything over to the new system and then ran a search and replace with EditPad Lite in the xml – just as suggested, inserting the new Vista directories. iTunes actually crashed the system the first time, so I had to re-copy the iTunes library files, and try again. Second time it worked.

    I’ve got about 6,000 tracks and they all appeared perfectly in the library, along with all playlists, etc.

    don’t forget to go to Preferences and click “show” for audiobooks and games (I thought mine hadn’t imported, but I just forgot to set all the options in my newly installed iTunes).

    I had to drag my podcasts folder into iTunes manually, but they all showed up and now I’m re-subscribed, and all is working well.

    Preserved playcounts, ratings, last-played dates, everything.

    Good luck to everyone else!

  118. Hey there, I have been doing this trick for a couple years and have had a lot of luck, I just however tried to do this with some really bad results and thought maybe someone can point me in the right direction.

    For some reason, when I ready my XML (which is intact) and clear out my itl, then load up itunes, it only grabs about 900 or so of the 3000+ songs in the library? the number of songs it grabs seems to change each time I attempt it.

    I’ve always had stellar results? I dont know what might have changed, other then the version of itunes. Anyone see similar results?

  119. Fabulous stuff.

    What if I have 3 separate iTunes libraries that I want to consolidate (one desktop, three separate users, added an external drive)...

    a) move the libraries into one location
    b) append the xml files together
    c) do a find/replace and point to new location?

    Or is this too complicated, worthy of another tutorial?

  120. Jeff, hmm, I don’t have an XML file handy but if there’s no “index” in it (an integer number that’s increasing with every entry), maybe you could do it.

    It’s all theoretical though.

  121. Good point, KC.

    I did a quick podcast download on my itunes, opened up the xml file, and unfortunately it does have some index number:

    Track IDn

    It is this Track ID integer that references that particular track with the Playlist.

    Will play with it a little more…

  122. Jeff, if it has an index I’d be very cautious with proceeding. (And I’m doubtful it would work.)

    Back up twice, and keep us updated!

  123. Jeff
    You can add all the xml files, be sure to place the tags where they are supposed to be. Then, run some script that changes the index(Track ID) on the xml file, so no files have the same number.

    If you have manual playlists, you need to update the indexes of the music there as well, or you could delete the playlists and rebuild them later within iTunes.

  124. Itunes disorganized my libary. how do i get it back back to the way it was?? i like it to be in genre then artist only. it made another folder in which what album its in. how do i get it just to be organized in genre then artist only??

  125. well its not the libaray that is disorgainzed. it was the folder inwhich the songs are in. i went to edit then preferences, then to general and check the keep my itune music organized. after that it disorganized it in there. how would i get it back to normal.. with just the genre folder then all the artist in that folder.. instead of artist then album? i have 4000 songs i was doing them manual but then i gave up.

  126. Itunes disorganized my libary: use a proper name, take a minute to write a proper comment (punctuation, etc.) and then you’re welcome to submit it.

  127. Thanks author for the helpful information. This is what i was looking for long ago.
    I need to update my (iTunes) file paths following my upgrade to Windows Vista

  128. I had a completely full ‘C:’ drive and had already tried moving the music files to my external hard drive “E:”. Much to my horror, when I deleted a folder containing just the music files from my ‘C:’ drive, all the music disappeared from my iTunes. I found these helpful instructions, discovered the (still undeleted) iTunes Music folder and the libraries, and moved these over to the E: drive. The ‘automagic’ restart did not find them, even when I tried to use ‘consolidate’. I tried ‘import’ also, no luck. Tried viewing the XML file, and it only had the 15 files in it I downloaded after I deleted the music files (part of a new TV series I was in the middle of downloading when I discovered the lack of space problem on my C: drive). I had decided that downloading version 7.3.1 might help me solve my problem and so the XML file had been over-written on the install. Still, I found one more option: “Add folder to library” worked – I added the newly re-located ‘iTunes Music’ folder and all my 5250 songs and 330 podcasts were added to iTunes in this process, plus all the TV shows I had downloaded this past year. Thank you so much for this resource!

  129. I recently switched laptops and I downloaded iTunes onto the new one but I’m not sure how to transfer the songs from my old laptop onto my new one. I don’t know if the steps at the top of the webpage apply to me. Please help!

  130. I did this with iTunes 7 and it worked like a charm…thanks so much.

  131. I’ve been reading through this site and I’m finding some of the terminology surpasses my knowledge. For example: what is an xml?

    So, I’m not sure if you have answered my questions in this blog or not. Here’s my issue: my CD collection has been ripped into Media Player. A friend also added her music into itunes. After I had a full system restart on my computer, the music files were added back in. MediaPlayer grabbed all its music without a hitch. itunes didn’t. itunes doubled up files and most of them show up as corrupt. I would love to be able to take all the albums from itunes and import them into MediaPlayer. Is this possible? Many thanks.

  132. I like this article very helpful…but i have a problem…maybe a year or so ago i had all music on an external HD and then I got a very large internal HD so i moved the music onto that…so basically all the music in my itunes library showed up with the exclamation marks. So basically I gradually (over the past year or so) manually would browse for each file using itunes and so link it to my library once more…it’s been almost a year now and I still have tons and as you can figure very tedious and time consuming…So would the method you described above work for someone like me who has pretty much manually browsed and added most of my music already and would just like to have the hundred or so remaining songs with exclamation added to the library quickly?

  133. i am trying to move my itunes library from my hard drive to an external one. However, I run two ipods from my itunes, one which is organised by itunes and the other i manage manually. Should i follow the instructions for ipods where music is manually managed? can anyone help?


    an IT ignoramus

  134. Maybe you’re on a summer vacation or you have found love or even maybe your computer is being held ransom. If so I feel terrible to throw my “what could be to some insignificant” problems your way:). But please help! I’m out of touch with 3000 songs. (Oh, how I miss thee). Even just a clue about how to get back my i-tunes. Please see above posting.

  135. I personnally proceed as following:

    – sync my ipod with iTunes – move my library from my iPod to the other computer with CopyTrans

  136. This doesn’t work for me. Neither steps. I’m usind iTunes 7, mabe that’s why. Any other suggestions?

  137. I am not sure if it is appropriate to ask, but here goes. Is there a way to build two different libraries with iTunes? I had a library with tunes in it. My wife wanted me to copy music and load her ipod. I didn’t know how to do that without wiping the old library and making a new one with her music. Please help.

  138. Beautiful, works with iTunes 7.

    To William Friel above, you have to create a new account on your PC (one for you, one for her), install a new copy of iTunes and maintain her own separate library under her login. You can both use the same music, it just creates a new index file for her.

  139. Thank you very much for this article. This has resolved a problem I had with iTunes and saved me hours of work and frustration.

  140. Worked like a charm! Took a while to copy 60+ gb to my external and than over to my new pc, however. Everything worked just as written. One difference was that my podcasts were for some reason not imported. I had to add them to the library through itunes from the folder they were stored in. They went right into Podcasts under the Source though, so it all worked pretty well. Thank you million!

  141. hello!

    This procedure isn’t necessary any more.

    I’m running iTunes and I’ve been waiting to move some podcasts over from my old laptop over to my new desktop. To clarify: both machines are subscribed to the podcasts, but the laptop I don’t use so it only has the old podcasts on. And I want these old ones moved to the new computer.

    I don’t let iTunes manage my MP3s, HOWEVER all podcasts are obviously stored in the default iTunes music folder. So I just copied all the podcast files in there, to where other (but different) episodes from the same subscription existed.

    If I go to File > Add Folder to Library (or File > Add File to Library, or even File > Import if you like), these files can be imported correctly to the library, and they appear in Podcasts (not Music) and are also nested under the correct subscription.

    They will be marked as unplayed, but other than that, your procedure doesn’t seem to be necessary any more and two sets of podcasts can be consolidated without troubles :-)

  142. Sorry for confusion – this is for manually merging podcasts, that’s all I tested.

    Last time I merged libraries, I started with a blank library, reimported the entire library, and used RatingMerge.

  143. No need to do anything with the itl file.

    1. Trash the iTunes Library (itl) file.
    2. Do a Find and replace in iTunes Music Library.xml
    3. Within iTunes, File/Import… and select iTunes Music Library.xml
    4. Wait
    5. Done

  144. I have two user accounts on the same computer sharing the same iTunes library, when upgrading to the latest iTunes I did it from the “wrong” account. iTunes made a new itl file – but couldn’t save it.

    Thus I had to switch to the other account and import the xml file manually (before doing so I did a find/replace in the .xml file to fix some issues).

  145. Thanks a lot!!
    This is a powerfull tip!

  146. ok i still seem to be struggling with the whole thing.
    i have used itunes for quite a while on a windows pc without letting it manage my music library.
    now i am switching to a macbook. i put all my music from the windows pc and including the itunes folder that has the .xml and the .itl files in it on an external hard drive and then on the mac. then i replaced the locations in the .xml file. i entirely emptied the .itl file and erased the .itl extention (which mac doesnt have) and then started itunes and clicked on “import” and chose the edited .xml file. itunes found all the music including genre and rating but without the play count and the “last played” entry. what am i doing wrong? i never get the message that the itl file is missing/corrupted. what am i doing wrong?
    thank you anyway for a great howto which at least got me closer to solving the problem than any of the information i had found so far.

    all the best from germany,

  147. finally got it to work. thanks for the great howto!
    switching from windows to mac it’s apparently important to use the music folder itunes has selected in the beginning . . .dont know why but i didnt work for me otherwise.

  148. Just did this successfully from a PC to a Mac. Thanks so much for the step-by-step—this is huge.

  149. Ben F:
    It’s important to have the same folder names, but in preferences/advanced you can set any place you wish to have your music library reside. I use both internal and external depending if it’s for my Ipod library or my AIFF big boy home use (server) library. You most likely know this-but if you don’t you do now. Welcome to the Mac world!

  150. You can also use a software utility I wrote after Googling and finding this (and a few other) article. The iTunes Library Mover automates all the manual part of copying or moving your library and has video tutorial to walk you through the process.

    Thanks for your tips… I couldn’t have created the software without this page.

    You can download and use the software for free at Feel free to distribute it and share with anyone you want.

  151. myfreepaysite members area login

  152. I have had NO luck with moving my IPOD music folder. When I click the “Change” button and change the directory to another hard drive, it always comes back. When I click “Copy Files to iTunes Music folder when adding to library.” it stays that way for the duration of my iTunes session, but the next time I start up iTunes, it’s back to the original setting. I’ve tried this MULTIPLE times. Now, get this, if I edit my Itunes Music Library.xml file to include the new folder, delete the contents of the Music Library.itl file, then rename all references to any duplicate or similar files to filename-old.itl or xml. iTunes does dutifully re-create it from the xml file and ask me if that’s okay. But the next time I start iTunes, the old file location is back. From where, I have no idea. It is truly driving me crazy. It should be a simple thing, no? Why is it so difficult, or in my case, impossible? Any help would be appreciated.

  153. had seen this link much earlier and it took a while to find it again but – the steps worked great! only one curiosity – some range of artwork / cover art is missing ??? on my Mac machine it is all there but now on the PC much is missing? on the Mac i used Clutter after one try with iTunes’ own find art feature. after all i’d read way back then i’m not really attached to try to get artwork back but just mostly curious what happened? or perhaps the better question – where does the art work live – via clutter vs iTunes ??

  154. Thanks alot. This article really helped me alot. Bless you.

  155. Thank you SO much! This was just what I needed. A tip for anyone else:

    If you’re moving from a general music folder to more custom ones (for example, I alphabetized, so I had folders A, B, C… by artist), you’ll need to go one step further with the find/replace. I did find Music/A and replace with Music/A/A for this. That way, if you have an mp3 that starts with “A”, it will move it into the “A” folder. One more tip – actually erase the contents of the itl file, don’t just delete it. Otherwise, upon opening iTunes, it just overwrites all your hard find-replacing work and you have to do it all over again like I did. But regardless… it works! Thank you!

  156. I can’t get this to work on iTunes 7.4.2 – I’m moving from my PC (iTunes v. 7.4.3) to my MBP. All the music is on an external, but I’m getting the error that the library file was corrupted, and it then shows 5,000 fewer songs than I know I have. Any ideas?

  157. Hey Konstantinos, Schmolle, and Simon – Thanks for a Great Great Tip!

    A nice side effect of all of this is that I can connect and manage my iPod to multiple machines, now that they all use the same library on my NAS storage.

    Sorry if this is repeating a comment already made, but the list of Thank Yous is (understandably) quite long now.

    Once again, cheers for the tips.

  158. Sixmillion: thank you for the kind words!

  159. I’ve read both this article and the one initially posted by Schmolle, and I think I’m going to give it a try, as I can’t bear submitting to the organizational style of iTunes. However, I’m not merely relocating to an external drive – I also then want to copy all my files onto the hard drive of a new computer (Windows) and access all the files + data in an iTunes program running on that machine. So what are the extra steps I take after I’ve relocated to the hard drive? Do I just add all the music, and trust that iTunes will recognize play counts because the .xml file is already present, or is there more to it?
    Thanks, this article has been extremely hellpful.

  160. I just found this article and comments and am thankful. I am building a very large iTunes library on a pc using XP. The library is 75 gigs now and I expect it will be 3 or 4 times that when I have loaded all my cd’s into it. From reading the comments I understand that there is a concern about library size, that iTunes can’t hanclle large libraries. I am running 7.5. Am I heading for disaster? Also, is there a way to edit the genre list – I have added new genre names along with some typos and would like to clean it up. Thanks for this site.

  161. Jim: iTunes gets sluggish as the library size increases, there’s no way to work around that, I think.

    As for the genre question, click on the misspelled genre’s name in the respective ‘Browser’ column, select all the tracks that belong this genre (click on one, then Ctrl+A) and right click to edit the info. Write the new genre’s name in the respective field, click ‘OK’ and you’re done.

  162. I am trying to organize my videos. How do I move the music videos to the music video? They all import in to the movies and will not allow me to import to the correct file. I am using 6.5 versions of Itunes. I had conflicts with the 7. Newer version. I will upgrade once I can get the conflicts resolved. I am using XP Pro .
    Thanks I have learned allot from this website.

  163. Thank you so much!

  164. Just did it on Itunes 7.5 after a replacement of my Mac Pro by apple due to failure of the power unit.
    so Mac DP2.5Ghz G5 to Quad2.66 G5 WORKS!
    Ran the transfer from a dmg file of previous hard drive contents…with over 22,000 songs and 90 GB of music it took a while but was a great success
    Thank you

  165. Eric: you’re welcome, glad it worked.

  166. That was very useful, thanks!!

  167. hey, i kinda have a similar problem. my C drive was running outta space so i just dragged my itunes forder to D drive, thinking it would clear up some space, it didnt. I had not used it sice then but when i connected my ipod yesterday and and when into itunes i could not get anything to work, i couldnt play songs, import and when i went into the music part all the songs where grey and could not select them. i tried moving the folder back to its origional place but since iv no space it didnt work.

    Has anybody got the same problem or does anyone no how to fix this???

  168. Date Added was a field I used a lot for playlists, but since I used this great method to move my files, I’ve started using the Date Modified field…this is actually my original add date, so all is well for me.

  169. This tip was perfect! My old computer’s motherboard got fried and I bought a new computer. I was able to save the hard drive with all the data, but I was definitely NOT looking forward to purchasing the music again or manually locating each file one at a time on the hard drive. This tip was a dream come true! In just a few minutes I was able to change the XML file, wipe out the ITL file, and iTunes automagically found all the files! It’s bad enough to switch computers, but this was an upgrade from XP to Vista and everything is new, so this was fantastic! THANK YOU!

  170. Thanks for the guide it was really helpful. The only thing different that I experienced was that the podcasts didn’t show up in my library (3-4 episodes did), but the rest of the episodes were moved to a playlist (on the left pane).

    Thanks again.

  171. Oh. One other thing. I had two .xml files:
    1) “iTunes Music Library.xml”
    2) “iTunes Library.xml”

    iTunes Library.xml was modified more recently and idid infact have the more recent updates, so I did the find and replace of the path on this file.

    When I tunes reopened it worked of the the older (unchanged) “iTunes Music Library.xml”. So I had to re-erase the .itl file and rename “iTunes Library.xml” to “iTunes Music Library.xml”.

    Not a big deal. In fact, someone may have already added this comment. I have to admit that I got impatient and didn’t read through all the comments.

  172. Vijay: thank you for the detailed follow-up; appreciated!

  173. You can do the same without XML editing. Just export to a TXT file, then edit it with the note pad and then in th new computer import with iTunes the edited TXT file (after you placed the files in the new location). Thats it. I did it and it worked but again some things are lost: podcast subscriptions, last date played (ratings and play count remained intact!), etc.

  174. Hi everybody:

    I’ve been through this migration issue a few times now, as I have moved a sizeable iTunes library (not managed by iTunes) among a few external drives.

    I was delighted about a year ago to use this general workflow, “globally-replacing” the directory path in the XML file, the “old” one with the “new” one.

    Alas, this isn’t working for me any more. I’ve tried a few different approaches but one of two things happens:

    1. if I don’t gut the iTunes Library file (Not the XML file; I’m on a mac, btw), then all of the new directory paths are magically overwritten back to the old directory paths. I kind of understand that this is maybe b/c the “old” directory paths are preserved in the Library file.


    2. if I DO gut the iTunes Library file, after the XML rebuild and notification that my Library file is corrupt, then I wind up with a library that has NONE of my ext. drive songs (which is the bulk).

    I am stumped. I’ve carefully made sure I’m correctly globally-replacing the directory paths (over 17,000)..

    I’m wondering if something has changed in iTunes that’s preventing this. I did this successfully about a year ago, as I said.

    Anybody else having this problem? Has nobody written a utility yet for Mac to move an iTunes library but preserve playlists, etc? It’s crazy that this is so challenging.

    Yours in reasonable competence and savvy,


    macbook pro. os 10.5.1, iTunes 7.6

  175. Hi y’all:

    scatch my previous post.. After hours and hours of trouble-shooting in the wrong directions, I realized that I had, IN FACT, been using the wrong directory string. DUH!

    This workflow works just fine for me.


  176. Mick: glad to hear you got it working!

  177. Hiya… When i decide to sync my itune from another computer, i did not consider this itune library and lost my ratings etc.. but thanks to your article (on 2nd attempt) it work! I noted that the search string that have to be considered in my case was different from the e.g. that you have. Previously I was using local hdd, F:\ipod but then I switch to a portable hard disk, F:\desktop\Ipod . What I realise is that the search string i had to use was F:/ipod replaced with F:/desktop/Ipod… And the search string had to follow the tags used in the xml file of the songs in the library, else it failed. I think that is why i failed on 1st attempt. But thank god, 2nd attempt work and I have an itune that looks the same as before!! Thank you Konstantinos!!

    Madxkatz on itunes 7.6 (feb 2008) on win xp (formerly Vista)

  178. madxkatz: you’re welcome!

  179. Glad to find this post, I’m getting a new computer in a few weeks and importing songs from 3 harddrives from my old computer…hopefully if i drop all the songs into a single massive 40 gig folder this method will work

  180. I just did this on a Windows XP box. My daughter has all her music on the Samba server. Her share quit working so I had to rename it..

    Steps: (1)Make back ups of .xml and .itl, (2) Edit the xml with WordPad, (3) Edit the itl file with WordPad and delete all the lines, (4) Start Itunes, (5) Click ok to replace the “damaged” itl file, (6) Open Itunes and wait for it to analyze all the files (In her case it was over 1000 mp3s.. !!)

  181. my old comp died i had my itunes on that comp,i was told if i plug into my new computer i will lose everything i have on it like music,videos,pic.can i avoid this? how thanks

  182. I just tried this on iTunes 7.6.1 and it remembered the import date. My only problem was with the podcasts, they apparently weren’t tagged with a the proper Genre before hand. Great guide. Thanks for the info.

  183. I am trying to take itunes of my computer. I have tried deleting it and it says its deleted by yet it still shows up on my pc. EVERYTIME i DO A VIRUS SCAN AND THE VIRUS SCAN GETS TO THE ITUNE SECTION IT COMPLETELY SHUTS MY PC DOWN. CAN YOU PLEASE HELP.

  184. Excellent description. Had to rebuild a WinXP machine and was able to completely restore itunes and playlists with this info.

  185. Steve: thanks! Glad the HOWTO was of help.

  186. You rock!! Thanks a million!

  187. Thank you so much for the information!

    Just a heads-up to those with Chinese or Japanese songs—for some reason, the reconstruction of the .itl file seems to jam when it hits names that contain certain characters.

    I’m not exactly sure what triggers this, since Chinese/Japanese file names apparently passed muster, but the song names didn’t. Plus, some characters I forgot to purge from the middle of an album name survived the transfer. Possibly it only happens if there’s a space followed by one of those characters.

    (If your library of 10,000 songs suddenly shrinks to 20 after the move—this may be happening to you. It certainly did to me.)

  188. An evergreen ! Great post, thank you very much !

  189. Thanks so much. This saved me. It made moving from a back up hard drive to my new machine go easy.

  190. llyse: thank you very much for that tip. I’ll add a note towards the end of the guide pointing to your helpful comment.

  191. Thanks! This is exactly what I was looking for. It worked great for me moving my library to a new Vista computer with iTunes 7.6.1.

  192. Thank you!
    These intels were exactly what I wanted to know.

  193. Hi.

    I have been moving my library several times using methods described here, and I am very pleased.


    (I am on Vista, using iTunes 7.6, with my library on an external USB drive (H:/Music))

    For some reason, the defalut iTunes Music folder suddenly was reset to C:/something – probably my H: was a little late in booting? Consequently, when trying to play music, the songs “couldn’t be found”. I was asked if I wanted to locate them, and I did. They were where they were supposed to, at H:. I changed the default folder back to H:/Music, and assumed that iTunes would check there when I tried to open a song, but no. It looks like I manually must specify the file locataion for all my songs (~4000), which of course is undoable.

    So, I thought I should use the “empty the itl-file and global search/replace the xml-file” trick.

    It worked fine, but as several people here have mentioned, the “date added” field was reset.

    And I want to keep it (I’m using it for nerdy statistics.) The order is not enough, I want the time stamp. Have anyone found a solution to this? Please!!!! I would be very grateful.

    (What confuses me, is that I though the “date added” was preserved as well, when i did this trick the other times. Could it be that it worked for earlier versions of iTunes? Or have I forgot something?)

  194. Thanks so much for this. I used the instructions with the latest iTunes, and the tricks seems to work. I didn’t do the podcast step, but my client cared only about her library of purchased tunes.

    Apple should have these instructions as part of it support site; really silly and inconvenient for them to not make the XP-to-Vista transfer easy.

    Just wanted to vouch for how well this works, so thanks again!

  195. Velanche: you’re welcome. Glad to hear it worked with the latest version of iTunes.

  196. I know you’ve been flooded with ‘thank you’s and i want to be in line too! After hours of reading online I found your directions above.

    The only issue I had was that I used Notepad to edit the .itl which didn’t work since the itl is too big for notepad to open. But if I’d read just a bit further in your article you pointed me to a better text editor…and voila! I’m perfect.

    You f’ing rock. Schmolle rocks too. Thanks so much to both of you for helping me keep my wife from screaming in frustration if I’d lost all those playlists during the computer re-format process.

  197. Moved an Itunes 7.6.1 library from XP to Leopard without a hitch. Only issue was I had to redownload all the Album covers from the Itunes store.

    Thanks a bunch!

  198. Andrew, Robert: thank you both for your kind words—I appreciate them.

  199. Konstantinos, even though you wrote this nearly two years ago, it’s just as applicable to the new version of iTunes.

    I finally needed to move my large music collection to an external drive due to storage constraints on my machine, and I googled every possible combination of keywords to find a good set of instructions. I really didn’t want to go back through my music, re-locate them with iTunes, re-rate songs, etc. At first I thought I had succeeded since I did everything, including modifying the XML file. However, no other resource I read noted that the ITL file needed to be modified. And, wow, it worked!

    The only point of difference between your podcasts and mine post-transfer, were that mine weren’t listed in the library browser – there wasn’t a “podcast” genre. Instead, it was listed as a podcast playlist, which might be due to iTunes 7.6.

    Either way, your “how-to” saved me a lot of hassle and heart-ache! Thank you very much!

  200. Angelo: thank you for your kind words.

    Glad to hear the HOWTO proved helpful to you, and that it applies to the latest version of iTunes as well.

  201. Hey, I think you have it a bit more complicated than it needs to be.

    1. First, no need to locate the XML file. Just go to File -> Export Library… to save the XML file somewhere. Alternatively, go to File -> Export… to save a text file with the same info in it. I think either would work, though I have not tried this with the text file.

    Now, delete, from within iTunes, the songs that are no longer where they used to be from the library. That’s just to avoid duplicates.

    2. Edit the XML file or TXT file to your liking.

    3. File -> Import…, and choose the edited XML or TXT file to import. Any songs already in iTunes will be ignored. Any others will be added.

    You can get rid of the XML or TXT file now.

    This should save all info that is in the ITL file. All you are doing is importing, not mucking with iTune’s files.

    Of course, if you use this method to transfer to a different iTunes installation (i.e. on a different computer), then only the info contained in the XML or TXT file will be transfered.

  202. Scott: that certainly sounds interesting.

    Is it possible that what you’re reffering to is this?

    If that’s the case, does my reply to that applies here as well?

  203. Excellent! I don’t like to use iTunes for ripping discs; I am a freelance music journalist and have extensive info for album notes, composition, lyrics, etc. for the tens of thousands of songs in my library. I was worried this would all be lost when i transferred to my new laptop. Your step by step worked like magic… and for latest version of iTunes. Thanks a ton!!

  204. Tony: you’re welcome!

  205. I have tried this trick many times now and unfortunately run into the same problem…The .itl and .xml files are simply overwritten upon reopening itunes, instead of rebuilding the library. Like i’ve said, i’ve tried multiple times and am pretty sure I am editing the .xml file properly, any thoughts on why this may be happening? Thanks!

  206. I needed to move my 1.2 TB iTunes library to a new drive location on a Mac.

    It’s a bit different. There appears to be no .itl file, just the iTunes Library file. I zipped up my file, modified the .xml file and opened iTunes. The library appeared blank. I’m trying an import of the .XML file and crossing my fingers.

  207. You rock, K !
    ‘Worked like a charm !

    You saved me hours of manual work – this is the best walk through to transfer iTunes files on the net.

    Thank you !

  208. Dinger: thank you, glad it worked for you!

  209. Don’t try this with itunes

    Followed exactly as the instructions listed. But itunes says my .itl file is bad and then creates a new one without reading the contents of the modified .xml file. My music library is now blank. I have restored the old .itl file and I am manually having to go through and tell itunes where the each and every music file is now located. What a pain in the butt. Thank you Apple for making my life more difficult.

  210. Comment deleted.

    [Editor: had fun writing that email address, ace?]

  211. AMAZING!

    This is exactly what I was looking for, as I just bought a new slaved hard drive that I want to store my files on.
    And it worked perfectly. thanks!

  212. Hello All,

    Where to begin? Well, we (husband and I) have:

    A PC with Windows XP
    An iPod with 1,832 songs, 6.7 GB (my husband?s) with iTunes version

    The other day, a new external HD (Seagate Free Agent 500 GB) came into my life, and I haven?t been the same since. I sat in front of this screen, reading all kinds of blogs on where to go from here. Thank God I found yours!! I never realized moving iTunes was little more than just moving a file or two from one drive to another. Setting up the external HD was a piece of cake! I have followed the instructions per the Apple website for moving the iTunes folder to our new external HD (clicked on ?Keep iTunes Music folder organized, named the new location for the iTunes music folder and consolidated the library). I also:

    Clicked on File, ?ADD Folder to Library? (this updated the artwork)
    Clicked on File, ?Export Library? (probably didn?t need to do that)

    Your original article says that if I allowed iTunes to manage the music library (which I clicked on per Apple), then performing your steps in Part 1 should be all I need to do. So, all I have to do now (per Apple) is ?locate the original iTunes Music folder and drag it to the Recycle Bin and Empty it?. I am MORE than a little nervous about doing this.

    Before I take that final step, I think I need to solve a couple of issues:

    Issue #1: All the music files in iTunes are duplicated now. Is it because the new D drive is backing everything up (per Brad, 2/14/06)?
    Issue #2: When I finally do plug in my husband?s iPod and it starts to sync, what will happen? I hate the thought of losing what?s on his iPod right now! The horror!!!!
    Issue #3: When I originally set up iTunes for my husband, I did not check the ?let iTunes mange your music library? option. Should I uncheck this option BEFORE I plug in the iPod again?

    I love your article—wish I could have come across it first before I read all the other blogs!. I downloaded all 32 pages of comments. I patiently read everything, making notes in the margins. I think most of it applies to Mac?s and that I should just ignore the info the on the .itl and .xml files. God, I hope I don?t have to touch those. I am not a newbie, but I think I might be in a little over my head. I?m on overloaded from all the other blogs I?ve read. So, any help that this thread could give would be much appreciated. I am impressed by all of the comments on this thread. Please help if you can. Thank you in advance.

  213. Some added comments:

    I turned off the scheduled backup function of my Seagate. I think that’s why I have duplicates of almost every song in iTunes. Also, per Prodoc’s comments (11/07/06) he says that if the I’m syncing iPod with the library, it will delete ALL audio files and transfer back to the iPod when connected.

  214. Carolyn: thank you for your kind words and the detailed comment.

    Before I go on, let me just say that it’s been a couple of years since I wrote this HOWTO (and performed the procedure outlined here myself) and my memory has faded a bit. So, I won’t be able to help you as much as I could and you should take my advice (if there’s any) with a grain of salt. That said:

    RE: Issue #1: Seems like it, yeah. I don’t know the details about your drive’s backup function, but out of curiosity, where are those backups placed?

    RE: Issue #2: I’m mostly certain about this: yes, the tracks from your husband’s iPod will be erased. Why does this worry you though? The iPod is meant to be a mirror all, or part of your iTunes library. If you have the iPod sync to a specific playlist on iTunes, and you move the location of the library but otherwise keep it intact (that’s the point of this guide, after all), the iPod will re-sync to that playlist and the exact same songs will be loaded (again) on it. The only thing you may lose are On-The-Go playlists and any ratings that have been performed with the iPod in hand and haven’t been sent back (“synced”) to iTunes.

    RE: Issue #3: You can leave it checked so that it manages your music library, it doesn’t matter now that the songs will be re-transferred to the iPod (see my reply to Issue #2).

  215. Thank you so much Konstantinos! Issues #2 and #3 are solved. But I am very concerned about issue #1 and I will tell you why. Since, my first posting, I turned off my scheduled backup feature on the external HD and did a “Get Info” to see the drive paths of the duplicated songs. For example, one duplicated song now has a C path and a D path (D being the new destination). I hope I answered your question about where the “backups” are. Since I am using the external HD to clear up some space on the internal HD, I know I will be taking all the ‘eggs’ from one basket to another. I started reading about THAT too. How many backups can you have? Apparently, not enough. But I don’t think my husband is ready for that concept yet! A second external HD? Yikes!! I am worried because my duplicate count is 3,949 and my husband’s iPod has only 1,832 songs on it so far. Did I lose some songs during one of the steps?

    Finally, I took a look at the new destination folder to make sure all the songs were there. When I click on My New Music Folder, it lists the songs in alpha order and they all SEEM to be there. But get this—in the “i’s” is a folder called iTunes, right in the middle of this alpha order of songs. I click on that and I see every song that is on his iPod—again. But this list is more complete, I mean it has EVERY song that I see when I turn on his iPod. Do you think I’m still O.K. to take that “final step”? I realize this is alot to throw your way and I appreciate your honestly about being a little fuzzy on these things two years later. But if your can help me—and you certainly have on issue# 2 & 3—it would be appreciated! Postscript: iTunes is telling me it has an software update. Should I do the update before taking the “Final Step”? Thank you, thank you, thank you!!!!!!

  216. I think I’ve solved part of the “multiple copies of the same songs issue” (that happened when I clicked on File, Add Folders to Library (from my first post). Something to do with iTunes seeing them as fresh files and thus makes new copies. Yikes!! I made sure I don’t have the Copy files to iTunes Library feature checked. Just hope the mulitple copies disappear after I make the transfer (hasn’t happen yet)!

  217. Carolyn: if I’m reading what you’re saying correctly:

    1. Let’s say you’re seeing the song “Imagine” and its duplicate in your iTunes library. If one of them is on drive C (I assume that’s the old, original location) and the other on drive D (your FreeAgent external drive), then this isn’t a byproduct of your external drive’s auto-backup feature. It just means that your iTunes library has all of the old entries, PLUS the new ones.

    2. Does the iPod hold your entire iTunes library, or part of it? If it’s the former (i.e. the true size of your library is 1,832 songs), then the fact that your library now consists of 3,949 songs (> 2×1,832) doesn’t (necessarily, at least) mean that you lost some songs (that could have been the case if the new count was < 2×1,832); it may simply mean that you’ve got the old entries (1,832), the new ones (another 1,832) and some additional duplicates (285) which may be the result of your drive’s auto-backup feature; i.e. I guess (cause this is just it, a guess) that those 285 songs appear three times in your iTunes library.

    3. The Software Update shouldn’t have any effect on what you’re trying to do; just to be on the safe side though, leave it until after you’re done with migrating your library.

    4. RE: The “iTunes” folder & the “Copy files to iTunes Library” checkbox; I’m addressing these two together cause they’re related. I still haven’t understood what you’re trying to do here. Do you want to move to a scenario where iTunes does all the handling (read: organizing) of your music (I thought that was the case from your previous comment), or not?

    I’d like to help out; I think I’ll re-read my HOWTO to freshen up my memory. (By the way, my next reply may be a bit delayed—I’ll be out in the road all day tomorrow.)

  218. Hi, Konstantinos, I’m here. Thank you for your latest reply.Thank you for your last reply.

    The true number of songs is 1,832 and that was the last count on iTunes staus bar. So I am comfortable in agreeing with you on your explanation of the count.

    On point #4: No, I don’t want iTunes to manage the music; but checking that box (“let iTunes manage your music library”) was part of the Apple steps before taking that final step and dragging the folder to the recylce bin— When I originally set up iTunes for my husband, I left this box unchecked. After the migration, if I uncheck the box and then sync his iPod, will that mess things up? Hope that clarify things. And thank you.

  219. Hi, Konstantinos. Well, I took the plunge and completed the migration approx. 2 hours ago. I felt I had enough info from your posts to complete the process today because I said”Oh Heck, Just do it!” I then closed itTunes and reopened it. I even closed and restarted the computer just to be sure. And it’s all still there! The number of songs/items went from 1,832 to 2,728. Apparently, my husband wasn’t putting all of his songs on his iPod, especially alot of recent purchases and CD’s he’d burned on the internal HD. My husband’s iPod sync was was successful-no error messages at all. He did lose a few tunes (might have something to do with the WMA format I’d started reading about). He also lost the info in his playlist (also read about AND expect this to happen). I actually printed out every playlist and all his recently purchased music he had so he could see them-thought it might help me as well.

    So I guess the next step is to wait and see what problems come up. My husband owes me BIG TIME. I will continue to follow your blog and if a problem comes up I’ll check back in. Thank you so very much!!

  220. Thanks for the detailed guide. It has given me some glimmer of hope of keeping my song ratings and play counts that have been years in the making. I have followed every step of this guide to the best of my ability but always run into the same problem. I have a very large library on my windows pc (approx 22,000 songs). When I corrupt the itl file and replace the xml file on my new mac mini, it only imports a fraction of the songs. (about 8500). I kept the file structure of my music folder in tact on my external drive, and I double checked that I changed the file paths to work with the mac. I’m so discouraged right now. I don’t want to have to lose all that song information. Any advice or suggestions?

  221. Very intuitive and very helpful. Your instructions were easy to follow and worked flawlessly. 2 Thumbs up.

    Thank you.

  222. Gavyn: thank you for your kind words.

  223. thanks, i did it once already and it worked. well, iTunes sucks. I just upgraded my windows and consolidated my library before doing it, so that i can avoid all this hassle. well, when i copy my consolidated library all the meta infprmation (ratings, playcounts, etc) is lost! so no way to transfer my library other thaan “part 2” of your tutorial. It is amazing how apple manages to make such common and trivial operations so complicated. fortunately i have a backup of my unconsolidated library…

  224. I just used this method to move my library from a Windows backup drive to my new Macbook. No cross-platform issues! Thanks!

  225. Wow, not only did it preserve my library data but it updated my iPod touch as if I’d been using the same computer the whole time. I was prepared for it to reload my entire library onto the iPod. What a time-saver!

  226. Tom: you’re welcome, glad it worked!

  227. I have songs 3000 or more all over my C, D,drives,some in Itunes .. downloaded both drives on new G-drive USB sata harddrive, I would like to combine/consolidate all songs from all over into itunes on I can put them on my new Vista computer..but don’t know how to get them all in there, without losing them or having all the problems I’m reading here..

  228. After following the advice for rebuilding my Itunes library 200+Gb and dragging the folders to Itunes as recommended in numerous blogs I discover Itunes has organised all the tunes all right. It put them all in one folder called ;No Artist’ and wiped all album and artist information. I have now got a wonderful job ahead of me in re-organising my CD collection which is DAYS of work at best. Best advice is DO NOT USE ITUNES it is crap and one of the worst pieces of software I have ever encountered.

  229. do u know how 2 download songs from itunes library to windows media player?

  230. have just acquired Linn Akurate DS for my stored music system .......anyone else?

  231. I just rebuilt my library purely by importing the XML file, didn’t have to edit anything. It said it couldn’t find some of the tracks, I’ve not explored to find which ones… mainly because I can’t remember what’s not there. This is with the latest version of iTunes.

  232. Thanks Konstantinos, an absolutely superb solution to my problem! My father-in-law insisted I convert his 13000 odd songs from AAC to MP3 format (which itself took some 36 hours), at which point iTunes decided it couldn’t find them and wouldn’t play them. I didn’t want to spend the next two days re-importing all his songs, so, following the advice above I edited the XML file to find and replace all the AAC extensions with MP3, corrupted the ITL file as suggested, left iTunes to rebuild the library and everything now working fine!!

  233. Excellent! Thank you for putting this together. I just upgraded a hard drive on my Windows XP machine, copied my itunes library over, and was missing all the data (playlists, # played, etc). To fix it, I deleted what I’d done, followed your instructions for Part 1, recopied the tunes from my backup, and voila!

    Thanks again.

  234. Mal & Ken C: thank you for your kind words, glad these instructions proved useful to you.

  235. Thanks for this. I used last night with iTunes 7 and Leopard10.5.3.

    I was a bit nervous about fiddling with the itl and xml files but it turned out to be much easier than I expected.

    iTunes gave some odd message about the library after recreating and created a folder with a backup. However, the new library was just as I had hoped.

    I also used the Assimilate View Options script from DOug’s script to get my playlists sorted too.


  236. Rishi: glad to hear it worked for you!

  237. hi there , sorry but i’m still way confused about the whole music moving process..
    if i can explain…

    i have a new vista notebook, and my old computer is a windows xp pc. my music has mainly been imported off cds using win media player to windows explorer files.then i add them to itunes by file/add folder to library. does this mean that i’m storing them twice- using more memory?
    if anyone can advise i would be very grateful!
    i moved my music files to my new computer using usb transfer cable. now i want to reload my itunes library with artwork etc, and have all the songs match up in their new locations. what do i do?? delete them off my new computer and transfer them all over again using my ipod? i still like being able to organise music through explorer- especially in vista. or can i transfer the library xml file as above and hope that it will work?

    yep im very confused..

  238. Hi,

    I have about 11,000 songs adding up to 80 gigabytes. I recently purchased a new hard drive and have been experimenting with your technique to move the songs. Everything works as advertised except when itunes tries to reconstruct the library – it runs for a few minutes and then chokes. I get the usual windows xp error message (send, don’t send, etc). I’ve tried this on one other windows machine with similar results. Is my library just too big?

    Thanks in advance,


  239. Aaron: I would think that 11k songs/80 GB is not an unusual library size, so that would be a “no.”

    Another error is probably causing this, but I don’t have a clue what kind of error that may be. (Sorry I can’t be of more help!)

  240. I’m moving right along with the step by step, but I am unclear as to what to do with step #5. I can open the .xml file with Wordpad, but I don’t know what “global search and replace” is. Am I supposed to delete all the info in the .xml file like I did with the .itl file??? In my old setup I was storing my music to and external hard drive and I thought once I downloaded iTunes to my new computer it would be as easy as unplugging USB from old CPU and plugging into new notebook. That didn’t work with itunes so I decided to go ahead and copy all music to new computer. I now have it stored twice on the new computer and once on the external hard drive. Thanks for you help.

    btw old OS is XP and new OS is Vista.

  241. Steve: “global search & replace” means you want to look for ALL of the instances of “phrase X” on your file, and have them replaced with “phrase Y”. Hope that clears it up.

    Am I supposed to delete all the info in the .xml file like I did with the .itl file???

    No, this should be clear from the instructions given in the post. You only “blank” the ITL file; you do changes to the XML file.

    I now have it stored twice on the new computer and once on the external hard drive.

    Yes, that’s because the default modus operandi of iTunes is to copy whichever song you add to it in its own special music folder (titled “iTunes Music” I think). It’s a bit of a bummer if you’re not used to it, I know, but there’s some logic behind it.

  242. Yes! It works flawlessly! I jut moved from WinXP to Mac OS. I’m using the same HD that I was using in Windows but as an external HD in MAC OS using a SATA HD enclosure. I used my MAC Itunes Library and my Windows Itunes Music Library.xml from WinXP. Thanks a lot, you saved a LOT of work.

  243. Rafael: you’re welcome! Thank you for the kind words.

  244. 1) File > Export Library > Save it as “Library.xml”
    2) Edit the XML file as explained in step 5)
    3) Copy the music to the new location
    4) File > Import > “Library.xml”

  245. Hi,

    Well just for the record, I have succesfully followed the advice and moved 289265 songs (1,37 TB), then rebuild the iTunes Libarary.itl.

    It took 22 hours to rebuild, but then everything was ok (except, as I knew in advance, not the add date of the songs).

    Thank you – Regards Leif.

  246. Leif: woah, 1.37 TB worth of music!

    Glad to know the HOWTO worked for you & thank you for your kind words.

  247. Because I don’t have an iPod and have a Sansa mp3 player, for some reason I can’t sync the music on to it from iTunes. Unfortunately, it only works when I sync it from Windows Media Player. The only way I know to get mt iTunes library onto WMP is to burn a bunch of CDs of my library, load them on to WMP, and then be stuck filling in all the information for each song.

    Does anyone know an easier way to do this? Thank you.

  248. Not sure If I just didnt do it right, but itunes continues to rebuild the library files.

    If I delete the original folder, edit the xml file in a new directory and clear out the itl file, itunes just rebuilds it in the original folder.

    IF I leave the original folder, create a new folder, edit the xml file in the old directory and clear out the itl file, itunes says the library has become damaged….renames the files to damaged, and recreates the original files….any ideas?

  249. I guess I should clarify…I’m not exactly trying to move my library..

    I’m actually trying to deploy itunes at work, and have it not associate 350 machines to use user’s network drives as their default music folder.. (Imagine how quickly that will fill up)

    I thought your method might help me, because if I can just have itunes rebuild its library from an edited xml file (after clearing out the itl file)...and in turn change its default music directory to local machines instead of the network drives, I can save a ton of headaches.

  250. B Cady: your line of thinking sounds correct. Unfortunately, I don’t know what causes the problems in your case. Sorry!

  251. This worked great for me as well. I was just a little thrown by the fact that my xml file entries looked like this: Locationfile://localhost/I:/All%20DVD%20Music/
    instead of the “I:/All DVD Music/” I was expecting. I just switched out the old drive, I:/All%20DVD%20Music/ for the new drive, E:/All%20DVD%20Music/ and it worked like a champ. I am using the latest version of Itunes 7.7.

  252. So this is how it worked for me, moving from my old laptop to new one:

    Installed iTunes on new laptop, then uninstalled it through control panel. All of the needed directories remain. Copied xml and and itl library files as well as album covers etc. from old laptop into the itunes directories on new laptop. Installed iTunes again on new laptop. After installation, started iTunes. Took a while for initial load, but iTunes on new laptop is exact replica of iTunes on old laptop.

  253. Wow – thanks for the great info!
    I got a new pc and set it up the same as the old one – same name, programs on C drive & iTunes files on D drive (copied straight onto it using external hard drive as go between).
    Then using ideas from the info here I downloaded iTunes to new pc, and copied from old pc 4 files into the same directories: – iTunesprefs.xml from C:\Documents and Settings\myname\Local Settings\Application Data\Apple Computer\iTunes – iTunesprefs.xml (don’t know why 2 docs but they were a different file size so did both) C:\Documents and Settings\myname\Application Data\Apple Computer\iTunes – iTunes Music Library.xml & iTunes Libary.itl both from C:\Documents and Settings\myname\My Documents\My Music\iTunes

    Opened iTunes and everything was there immediately. Didn’t have any podcasts so don’t know how that might have worked. Downloaded iTunes music just asked for authorisation of computer and all worked fine.
    (Windows XP Prof, iTunes 7.7)

    Many thanks Schmolle & Konstantinos for a great site!


  254. Thanks a lot for the guide. Sad as it is, I was quite upset when i had to format my drive solely because I would lose my itunes playcounts. I’m glad I stumbled on this site.

    Thanks again

  255. Valerie & Chris: glad you found the HOWTO helpful. Thank you both for your kind words.

  256. I’ve followed this guide before and it has worked fine.
    However, I recently upgraded to iTunes 7.7 and now it seems that when it spots a corrupted itl file it ignores the XML file and just creates new, blank itl and XML files.

    Anyone else having this problem?

  257. I just wanted to point out that damaging your ITL file is not really necessary;

    Another option is to goto “file”>“export library”.

    This will export an XML (I’m not sure if this is the same as the XML that sits in your libary folder).

    You can then move your files, and on the destination, use file>import on the XML file (alter the file paths in the XML to reflect the new location of your files first, duh). It will say “importing” for a while if you have a large library… the only downside as mentioned above is that I see no way to import the old downloaded art and whatnot. :(

  258. I can confirm along with Brendan that this doesn’t work on the latest versions of iTunes (7.7 and up on a mac)

    Don’t follow the directions here without making a backup of the xml and Library files!

  259. Clearly the bulk of your bloggers are HP and other PC users. Your instructions for recent PC to MacBook coverts are overcomplicated and basically suck.

  260. anitadollens: I wouldn’t know where to start with as your comment bristles with stupidity.

    There’s no “bulk of my bloggers” since this isn’t Engadget or Gizmodo, where people are hired to write. This is a one-man show.

    RE: “PC users”—your point being? Are you complaining because I’m not writing for the exact scenario you’re interested in? Oh no! Where should I send my apologies?

    The instructions are indeed “overcomplicated” because iTunes didn’t provide an easy way for this transition. This should have been clear to you from the get go. Hence, you should probably address your concerns to Apple’s software engineers.

    Finally, would you be kind enough to explain to me how they “basically suck”? At the time of this writing there are over 250 comments in this thread, and about 2/3rds of them are people thanking Schmolle & me for helping them maintain their library data.

    If you’re still convinced that they do “basically suck”, you can always ask for your money back. Oh right, I forgot—you’re complaining about a free HOWTO that’s meant to help, and has actually helped lots of people.

    PS: It’s “converts”, not “coverts.”

  261. Just letting everyone know, I used this method to copy my library across to my Laptop from my main PC.

    Laptop had a bunch of music on it originally, so I moved those library files to a backup folder first. Then I deleted that music (most was in the music on the main PC). Then I copied across the music from the main PC, and then the Itunes .xml and .itl files.

    Then I followed this method of blanking the .itl and letting it reconstruct.

    Only thing I can suggest, is that make sure the iTunes on both computers is the same/latest version. For me this was 7.7.

    So yeh, this method still works on WindowsXP with iTunes 7.7

  262. Travis: thank you for the detailed write-up. Good to hear it works with the latest version of iTunes in XP.

  263. YOU ARE MY HERO. I would’ve hated to go through all of my two thousand songs and individually locate each one.

    This worked perfectly, so a million thanks!!

  264. MadMageEra: thank you for your kind words. Glad to hear the HOWTO proved helpful!

  265. Very helpful. I had a problem where my user account in Vista stopped allowing me to login (go figure). So I reinstalled Vista on a new partition and I followed this how to with a few minor alterations to restore my library. Here is my two cents to add to help anyone who might have experienced a similar problem.

    I didn’t have to search and replace because I recreated the username exactly.
    I also copied files from AppData (found in Roaming, LocalLow, and Local). I don’t know how much this may or may not have helped.

    I then copied everything else to the exact locations they would have been before.

    Following that I erased everything in the uneditable file (not the xml) as directed and re-subscribed to my podcasts.

    NOTE My podcasts were not recognized right away, I had to click File | Add Folder to Library and choose the Podcast directory within the iTunes Music folder. Following that, everything worked as expected.

    I did the same thing with a rented movie that I hadn’t watched yet, as well as my iPhone apps and ringtones. You may wish to repeat these steps for any additional content that, for one reason or another, did not find it’s way back to the rebuilt library.

    After I did this, I plugged in my iPhone 3G (2.0.1 – jailbroken) which was set to auto-sync and it backedup and synced with no problems. I have yet to transfer that rented movie (I’m saving it for an airplane trip :P ) but it looks like it added correctly with the time remaining on the rental, so I assume it should work properly. All of my sync options were intact.

    It’s possible that the only advantage to copying the directories from the hidden AppData (for XP users I believe it’s Application Data) is with firmware. However, I did it anways as a precaution and have had no problems as of yet.

    One more thing, I had to authorize this ‘computer’ even tho technically speaking it is already authorized, but because this was a new Vista install, I’ll bet that had to do with it. After that, re-sync, good to go. All content works perfect! That said, may be a good idea to deauthorize that other account if possible (which, in my case, it wasn’t) to avoid loosing one of your five available authorizations.

  266. T1NY: glad it worked out for you!

    Thank you for the incredibly detailed & thoughtful write-up.

  267. I’m about to try moving this to my new PC. I’m using a new version of Itunes so hopefully everything goes smoothly. Bit nervous, I organize EVERYTHING through playcounts!

  268. I’ve been searching around for a fix to this problem for a while and this looks like it would work, but I also want to run iTunes directly from my external hard drive and I found a pretty good tutorial at
    I was just wondering whether you think I should do your HOWTO first or that tutorial? Or is it even possible to do both?
    Appreciate your help!


  269. Adam: the tutorial you’re pointing to does sound interesting. I had a quick glance and I think that my HOWTO should be performed first but I could be wrong.

  270. Worked great on version 7. Thanks!!

  271. Thanks for good article. Confirmed what I had tentatively worked out for myself. I’ve just run the procedure with V7.7 and although it screwed up with some artwork and compilations, this was easily rectifed.
    I also had some (free) apps which disappeard, so be careful if you have some you have paid for. I would reiterate what others have said – there is no need to mess with the .itl file – just use file/import. Itunes article HT1451 gives precise instructions

  272. Julian: glad it worked for you, thank you for the report.

    For the record, here’s a link to the iTunes Support article you’re referring to.

  273. can anybody help, I’ve spent 4+ hours trying multiple different options around what the set steps are.

    I’ve had my windows pc stolen (but i’ve backed up the music with both itl and xml files. So i’ve copied those over with the whole music folder onto my new iMac. Changed the paths in the xml file, and deleted the itl data. I’ve got playlists, but more importantly i’ve got no play counts (which is all that i’m really worried about).

    Does anybody have any ideas on what I could be doing wrong? In the xml file, all the information is there, but it just doesn’t appear to be getting picked up when using itunes, apart from the playlists.

    Any help would be much appreciated.

    below is a cut & paste from the xml file (i’m new to mac, so fairly sure that the directories are using correct nomenclature?).


    Track ID273
    NameNapalm Love
    AlbumPocket Symphony
    KindMPEG audio file
    Total Time207360
    Track Number4
    Track Count12
    Date Modified2007-06-03T13:36:42Z
    Date Added2008-08-31T12:32:11Z
    Bit Rate184
    Sample Rate44100
    Artwork Count1
    Persistent ID6F2E9D8E738D3E64
    Track TypeFile
    File Folder Count-1
    Library Folder Count-1

    Thanks for any ideas…

  274. Nevermind, I don’t know what i’ve done, but i’ve managed to get it to work…

    what i did was install itunes 6, try the protocol – didn’t work.
    then instal itunes 7, tried the protocol again, and for some reason…. IT WORKED!!! :D

    in my nerdy world, this means a lot to me… thanks for making the site…. :)

  275. Kenny: heh, you’re welcome!

  276. thank you thank you so much!

    i’m quite a techonological idiot, but this step-by-step guide is really well written, so much so that even i can follow!

    you saved me a lot of time and from lots of headaches!

    thanks again! :)

    btw, it works on itunes 7.7 just fine.

  277. Melvin: glad you found the guide helpful! Thank you for your kind words.

  278. Hi!
    Thanks for all the great info!
    Sorry if this is a silly question! How do I back up my Itunes? :p

  279. great info…
    i have an observation/problem

    I have a 50gb itunes library on an internal mac drive, and an external usb hd (mac hfs+ journalised) with the overflow music. after the external drive started causing errors, i replaces it with a new external usb drive (fat32). I managed to get the library to recognise the new drive and the music plays, BUT i see one difference, with the new usb drive ,itunes loses track of the music ( ! before name and greyedout) when i rename/archive the mp3 files into folders….. something i never had with the previous drive, the music was always found after organising my music myself.

    solution is to edit the configs after every time i move the mp3s…. or to copy/replace the files back again.

    rather annoying, looks like itunes works “best” with hfs discs. i guess this is the same as when using an external nas….

  280. I jst tried it using iTunes 8 and IT WORKED!!!!!! Thanks!!!! You saved me hours of work!!!!!

  281. Martin: you’re welcome!

  282. This works (with iTunes 8 too). Period.

  283. Steve: good to know, thanks!

  284. Thanks for the howto, having some trouble with the steps above, appreciate a touch of assistance.

    I am trying to move iTunes playlists and ratings from one install of windows to another, all my music lives on a second hard drive, which hasnt changed, the first drive has been formatted and reinstalled. I have installed iTunes on the fresh install of windows and moved the ‘itunes music’ folder over, zeroing out the .itl file. When I start iTunes it says it’s importing the library and gives the message about replacing the .itl file but when it’s done there is nothing at all in iTunes. If I export the library from the old machine and import it in this iTunes it adds the playlists but not the song ratings. Does any of this ring any bells? Any help would be awesome.

  285. cosine: as I’ve stated again somewhere in the comments here, it’s been a couple of years since I last tried the method and my knowledge of the process is getting a bit rusty.

    “When I start iTunes it says it?s importing the library and gives the message about replacing the .itl file but when it?s done there is nothing at all in iTunes.”

    Hmm, I have no idea why this happens; sorry! Are all the Preferences in your new copy of iTunes set properly (i.e. the same as in your old copy of iTunes, particularly re: where the music is located)? That’s all I can think of, for now.

    Finally, if I recall correctly, the “song ratings are not preserved” effect when you export & import the library using the standard way is to be expected.

  286. How Dumb… my computer crashed … lost all files, data and programs…reformatted.. now i have my music on my Ipod but not in Itunes…(the dumb part .. I did not have a back up)..

    Does anyone know if there is a way to transfer the songs from my ipod to a disk or my new computer so I won’t loose all my songs if I loose my Ipod????

    Help Please…. and thanks

  287. Florida Ed: you can transfer the songs back to your computer (but maintaining library data, ratings, etc. is probably not possible). Have a look at SharePod. Hope that helps.

  288. Thanks for the ShasrePod tip….it was easy and worked great..

  289. Florida Ed: you’re welcome.

  290. I wish you wrote every single help tutorial on the web…you’d put Advil outta business tho ;-P

  291. Kathryn: thank you for your very kind words. I really appreciate them!

  292. I have my iTunes library stored on an external hard drive. I recently got a new laptop and want to have access to iTunes from the new laptop. However, when I plug the external hard drive into the new laptop (and change the directory as described), nothing shows up. Can anyone help?

  293. Wow thanks sooo much for posting these instructions. You saved me hours/days of re-rating my large music collection. I decided to do some house cleaning on my PC and moved all my music files to a backup drive, then did a factory restore /format of my PC to start from scratch. Then I saw all rating were gone after I reloaded. OH SNAP! Somehow I thought ratings were stored in the ID tagging. I used you method and got back 80% or my ratings if the file location was the same. Thanks for sharing. Now I know a lot better about how it all works and the file locations and file formats.

  294. BF: you’re welcome. Glad I could help.

  295. I followed the instructions, however, the iTunes 8 music library is different from what you indicated. The snap shot that you have does not work as no such line exist. The older version file, of which I happen to have by luck, was exactly the way you indicated. However, I need to set up this new file. The only string in this file containing any reference to a drive letter is: Music Folderfile://localhost/N:/My%20Music/iTunes/

    This new file is also much smaller than the older version.

    Can you help me out?

  296. Mf447: sorry, I haven’t touched that method in a while (and esp. not with the latest versions of iTunes) so I can’t really be of much help. Hope that you find a work-around!

  297. no need to do all the formatting stuff. just erase the .itl from your windows itunes folder when putting it in your mac itunes folder. much much easier. works with itunes 8. follow the link below. worked for me!

  298. To Nick & the author of the linked article over at MyFirstMac & everyone else: what you fail to realize is that with the method that I’m describing the location of the files remains (mostly) unchanged. Remember we’re examining the scenario where you don’t let iTunes manage your music library (files).

    In the MyFirstMac article (and various others), the first step is consolidating your library. Do you know what this does? It copies all of your music to the special iTunes Music folder, effectively moving you from the “I don’t let iTunes manage my music library” that you were holding right until now.

    Yeah, if you go that way the HOWTO is 3 paragraphs longs (max!) and it’s a process documented all over the Web.

    But my HOWTO examines the case where the user doesn’t want to let iTunes manage his music library. He/she didn’t want to before and he/she doesn’t want to even after the switch/upgrade/whatever. It’s a special scenario and there’s no case of “is it better than going the other way and letting iTunes manage your files or not?”; to each his own.

    So when Craig over at MyFirstMac writes “I found plenty of confusing guides that talked about editing xml files and changing access permissions, but I eventually discovered that it is much simpler than anybody seems to realize!”, what he doesn’t realize is that we’re talking about different things.

  299. This worked great with the latest version of iTunes 8+. Thanks for the help.

  300. Chris: you’re welcome! Thanks for letting me know it works with the latest version of iTunes.

  301. Thanks but it sounds like you’re transferring the iTunes library from one location to another within the same computer. How do you do it, preserving metadata, to a new computer?


  302. Brian: it doesn’t matter if you’re transferring to the same computer (in a different location) or to a new computer; the process is the same.

    Ask yourself: what’s the path to your music files in the new computer? Replace the old (i.e. current) path with the new path, transfer the needed files, etc.

  303. Worked for me. Mac and itunes 8.
    I haven’t checked everything yet, but it even imported some songs with japanese characters in the title.

    It took forever to rebuild the library. to the point where i thought it was frozen, but i just let it be and eventually it did it’s thing.

    Thanks a bunch.

  304. Ok, this worked, sorta. I have 8.0 on my PC and 8.0.1 on my new mac. the new files created for 8.0.1 threw the methods off, and they didn’t work. but if you have 8.0 files still, the directions work perfectly. So thank you for not making me loose my library! itunes library updater doesn’t work for macs!

  305. Bruno & Nick: you’re welcome, both of you!

  306. Fantastic, simple, and painless. My MP3 files are all stored on an external USB drive, and on occasion, the drive letter changes, so the ‘source’ path changes between F and H and I drives randomly for extended periods. I have used this method twice now, and both times come up trumps using iTunes v8.0. Cheers!!

  307. CrazyChris: glad it worked out for you! Thanks for the kind words.

  308. Thank you for sharing this with the world!

    Love you, lol

  309. Fernando: :D

  310. Thanks for the clear step by step instructions! It took some time, but everything works great, running iTunes 8.0.1 on a Mac. Before I found your blog, I tried several other methods to reconnect my iTunes library and music files after moving them to an external drive. this is the only one that worked. thanks again.

  311. David: you’re welcome! Glad the HOWTO proved helpful.

  312. KC—am thinking of (sort of) using your method to get rid of duplicates. My client started this process before I got involved and now has at least two copies of every song in his library. What do you think of wiping out the .itl AND the .xml , then quitting itunes and deleting all the dupes (he has a .mp3, a .m4a and a .wma version of each song right now) and just rebuilding the library by using file\add folder?

  313. oh, to be more clear, he has three copies of many of his songs IN THE SAME FOLDER. When I delete the duplicates, itunes still shows the songs, but with and exclamation mark there. It’d be tedious to go through and delete each dead link manually, so I’m thinking of deleting the dupes, then letting itunes rebuild the library.

  314. OldBam: if you delete both the ITL & XML file as you say, wouldn’t you be losing all the metadata then? Or am I missing something?

  315. Yes, I’d be basically building him a new library, hopefully with no duplicate songs. He’s got over 1800 songs on the duplicates list, and there’s NO easy way to delete them. From what I’ve been able to find out, Itunes sees a .wma and converts it to a .m4a, even if there’s already a .mp3 in the same folder. Then it shows both the .m4a and the .mp3 in the songs list. Dupes!!

    Hmm, that’s making me wonder why there were .wma and .mp3 dupes already in the folders. Curiouser and curiouser.

  316. Check Apples official solution at:

    Basically the biggest difference is to delete the ITL instead of making it corrupt. Works like a charm here!

  317. K, please chalk me up as a +1 for the issue FrequentFlyer brought up on 5/23/07. The xml imported all my metadata, but for some reason, all the paths in it look like links to streaming radio songs. The paths are correct, but they have the wrong direction slash and %20 where all the spaces should be. I’ve looked at the xml file I pulled from my C drive and this is the way they all were on there! I can not think of any method of doing a search and replace on all these slashes so I believe all I’m left with is to reimport all my music, and then use the playlists and star ratings off all these streams to reorg and re-rate my library! Then delete all these streams. Any other suggestions?


  318. Added info:
    I had to switch set-ups on the fly, so I never originally exported my library to an xml file off of my old computer in preparation of this switch. I just went back and grabbed the xml file that was already there. iTunes should automatically be updating this file, correct? With actual paths instead of paths to stream from those file locations? Or is the stock xml file that is on the C drive without specifically creating one through library export something different?

    Still trying to wrap my brain around this one!

  319. OldBam, there may be something I’m missing here, but there is a Show Duplicates function in iTunes somewhere. I know I’ve seen and used it before. It will show all files with the same song name. The problem is, usually, it’s difficult to tell which one you want to get rid of and have to check out the path of each file to find which one is the m4a. But if you go through and delete all the actual files first, and then open iTunes and use Show Duplicates, then you should be able to just delete every file there with an exclamation point next to it. I would think that would work for what you’re trying to do…

  320. muellej: the ”%20” shouldn’t bother you (I think); it’s meant to indicate a space.

    As for the backslash/forward slash, it’s a tricky issue. I can see two possible solutions:

    A. Use a text editor that understands regex (EditPad?). This way you’ll do a search & replace using regex; the tricky bit though is figuring out the regex expression that allows you only the paths within the XML file, and not the XML file in its entirety.

    B. Do a global search and replace that replaces the forward slash with the backslash. Besides changing the paths (which is desired), this also changes the rest of the XML file (which is not desired). For example… “< /artist>” will now be “< \artist>” which is not correct. You’ll have to proceed with several global search & replace’s then to fix the XML file (for example: ”< \” with ”</” will be one of them).

    As I have mentioned before, it’s a been a year or two since I last tried the method I describe in the HOW and my knowledge of the issues that arise when performing it are certainly rusty. Just trying to help here, but proceed with caution!

  321. Michael Newton: Good idea and I started to look into it but the module in question says it only works for itunes <4.5

    I was thinking a possible option might be to have something that works with the XMLfile and works out the md5sums of all the files listed in it. Then, when after you have moved the files around, it could track them down by the md5 and update the XML accordingly.

  322. You don’t need to do all those steps…. Just click the view button with 4 horizontal lines so it lists all your music, select all, and then hit delete, when asked to keep files or move to recycle bin, click keep files, then click and drag your music folder over to itunes and it will re-add all your music… ta-da.

  323. Justin: ...and then it’ll auto-magically remember the ratings, play counts, playlists, etc.?

  324. This worked great! I had to rebuild my p.c. and could not recover my 4,000+ songs. Don’t know how you figured it out, but Thanks for puting the time into this fix!

  325. About a year ago I did everything right and transferred all my songs to an external Freecom HD which I plug in via a USB. It all worked fine so I deleted all my songs from my computer’s Hard Drive and changed the location in iTunes preferences to the Freecom Hard Drive so it would know where to find them.

    Then one day my girlfriend went on it and it all went horribly wrong….Now, whenever I go into iTunes, I have to change the path in preferences as it defaults to the iTunes Music folder on my computer. This means I get the ! exclamation mark against all my songs and have to manually go in and find them. I have thousands of songs so obviously this is a problem.

    What’s the best way to resolve this without losing my ratings/playlists/changes, etc.. which I have painstakingly looked after these last few years? I basically want iTunes library to look into my external Hard Drive as before…

    Any help would be appreciated.

  326. Thankyou for this guide, you have save me loads of time in rebuilding my library!!!

  327. SeraphaxG: thank you for your kind words.

  328. Hi, I wonder if someone can help me?

    I’ve recently installed a large external hard drive on my PC and wanted to transfer iTunes to it.

    I followed the instructions given here:

    and everything seemed to go well ….

    ... Until I tried to rip some new music from CD into iTunes.

    I then found that the music was being stored in My Music folders, as .wma
    files, rather than in the iTunes Music folders, as previously.

    I noticed, on the iTunes edit/preferences page the option “Copy files to iTunes Music folder when adding to library”. This was unticked, so I assumed that was what was wrong, and ticked it.

    However, iTunes then began to transfer ALL of my music from iTunes Music into my own My Music folders!

    This was the opposite to what I had wanted and expected, and is a real drag.

    What have I done wrong, and how can I clear up the resultant mess and get
    things working properly?

    Any help most gratefully received .. before I go crazy!

    Thanks in advance.


  329. pitoucat: WMA files means that the ripping was (probably) done with Windows Media Player, definitely not iTunes.

    The whole situation sounds a bit complicated as is; try to eliminate Windows Media Player from the equation (i.e. re-rip your CDs using iTunes; this has the added benefit of better audio quality since WMAs imported into iTunes have to be transcoded first) and see how this works out.

  330. No, the ripping was definitely done using iTunes. Always has been. I don’t use Windows Media Player. I just run iTunes, put a CD in the tray, and it automatically imports the tunes into iTunes, always with a .wma extension.

    I can live with that, it’s just the fact that now those files have moved from the iTunes Music folder to my general My Music folder, and I don’t know why.

  331. Sorry! When I wrote wma before, I was wrong.

    Should have been m4a.

    Does that make better sense?

  332. pitoucat: M4A does make more sense; this confirms you are indeed using iTunes.

    What you’re facing is indeed puzzling and I’m sorry I can’t help; if your “iTunes Music Folder” location/path (as set in your iTunes preferences) isn’t set to “My Music” you shouldn’t get what you’re getting.

  333. Magnifique !!!

    Merci !!!

  334. Thanks a lot – Peter

  335. Thank you soo much! I was able to move 4 years of stats over with zero issue thanks to your help!!

  336. This kinda worked for me, but does not do all i want it to. I sort my list by date added. Before i tried this i knew it would do that. Anyhow. This also does not list my purchased items under the purchased menu??? I recently moved my ‘itunes music’ to a different hard drive, changed the music folder that itunes points to to the new location and i thought everything was ok. However, older purchased songs are still pointing to the old location and i have tried a few things to get them to point to the new location with no luck.
    I copied the itunes music folder back to the original location so now i have 2 locations with the same data. I go into itunes to switch the music location and the most recent purchases update to either location as changed but the older files that originally had the problem ‘relocating’ only point to the original location.

    I am only having a problem with my first 1000 purchased songs. newer purchases songs ok. I am trying to avoid 1000 Manuel file selections.

    I hope i am making scene. Any ideas or pointers? I am using vista 64bit ult and the latest iTunes 8.0.2


  337. It worked great (on itunes 8).
    GOD I’m happy!
    including tags etc.



  338. Konstantinos, dude, you saved my life! Had to move to a new drive and faced the prospect of recreating thousands of rankings, ugh.

  339. Hey all,

    first of all thanks for this guide! Great work, you have helped a lot of people. I have a way more simple solution though, that worked absolutely brilliant for me with Vista and iTunes 8.

    I’ve been using iTunes for quite some time, but a while ago my computer crashed and since then I’ve had all my music on an external hard drive (I sort all my music myself, hate having iTunes doing it for me). When I moved my music I didn’t find a simple solution to the library problem, so I rebuilt my library from scratch. As of now though, when my library is way to big to rebuild and I’ve bought myself a new computer to store my music on, I simply did like this:

    First of all I installed iTunes and copied my saved library into My Documents/Music, where it is put by iTunes by default.

    Second, your internal hard drives are usually named “C:”, “D:” and so on, but my external hard drive had gotten the letter “I:”. But one time when I had connected an USB memory, and then connected my external drive I learned that it was assigned another letter; “K:”. And more, this screwed up my iTunes library. I was a bit scared for a while, but a bit of googling made me realize that I could change the letter of the external hard drive back to “I:” by using the Disk Managment future ( And when I had done that, everything was running smoothly again!

    SO, the third step here would be to copy all of your music to whichever drive you would like, and simply change the letter of that drive, to the one iTunes played the music from before!

    Easy as pie!

    Hope this helps, cheers all!

  340. Martin, That link is very useful. I didn’t know that you can change a drive letter that easy. Thanks!

    I just bought a laptop. My itunes program is in my computer, whilst my mp3s/videos are all on my external harddrive (registered as G: on my PC)

    Of course, i want to retain my libraries, mp3s,videos,lyrics,album artwork

    I’m not very good in computers and can you see if what i will be doing is correct?

    1. Download itunes on new laptop
    2. Delete the xml,itl file on it?
    3. From the Itunes on PC: Open the “iTunes Library.itl” file. Select all text (Ctrl+A) and delete it. The file is now blank, with zero characters on it?save it. Copy that to laptop(under itunes). Copy the xml to laptop.
    4. I have to make sure that i change my external harddisk drive to (G:) on my laptop
    5. Open itunes, with my external haddrive connected.
    6. Will my songs/library exist?

  341. I tried this on a mac running iTunes 7.6.2, but couldn’t get it to work completely.

    I changed the XML file as recommended and then let iTunes rebuild the library (.itl file).

    The originally playlists are all there, as well as a few new smart playlists. However, most of these have lost the majority of the songs they used to contain. There are no exclamation point/song not found errors, they just are not there anymore.

    I have tried editing the XML file and rebuilding the iTunes Library several times, but I either have no songs in the entire library or run into this problem.

    I don’t actually care about the playcounts, but I would like to maintain my playlists with all their original songs. Has anyone else run into this problem of only some songs disappearing?

  342. Dan – I had the same problem, sort of. My main music collection is on an external drive which recently changed from F: to G:, with the iTunes-specific library (for ripping CDs etc) in “My Music/iTunes” on the C: drive.

    Updating the XML file to reflect the G: drive change, and zeroing the .itl file just resulted in iTunes telling me that the library file was damaged, but it only rebuilt with the “local” files, not the entire external drive.

    I just ended up re-importing it to get iTunes going again, but not ideal…

  343. I think iTunes should just include a setting to define the location of ALL music files.

    So if you wanted to move your music folder then you would just specify the location and then just copy all files to this location?
    I wanted to move my files from C to M and i changed the dafault music folder to this location, however all older files were still pointing to C (i moved all files to M)

    M for Music :)

    anyhow… i think it would be easy to add from apply into iTunes… otherwise i see moving/changing computers to be a pain if you are not keeping the same drive letter

  344. I have restored my itunes library from an external hard drive after reformating my pc. The harddrive has 69 gigs of music on it. I imported the library into itunes and am running it from my external.

    To regenerate ratings I did as your tutorial said and the ratings and playlists came back. But itunes now only recognizes 24 gigs of the songs in the external folder.

    I think that I will re import the folder again and delete the duplicates which would keep the ratings on the songs in itunes right now.

    Do you know what happened or a better way to retrieve the rest of my music?



  345. Thanks a million.

  346. I just released a tool at Sourceforge, which dummy users can use, when iTunes “lost” their files. It is tested with iTunes 8.0.2. It just automates, what you wrote. But furthermore, it also works, when you renamed your files, not just moved them (comparing file names and letting you choose out of the most propable).

    (Hope you do not regard this as spam.)


  347. Thomas: that’s neat. (Why on earth would I consider this spam?)

    Good work, I hope the tool works as good as it sounds!

  348. seems like i am missing 17 of my 11368 songs, but otw worked very well (I may have misplaced them somewhere else). Thanks.

  349. Thanks, this worked great and just saved me a whole heap of headaches

  350. Wow. Seriously thank you. I spent hours searching for a (best) solution and this nailed it. Many thanks to you and Schmolle.

  351. OK – everything seems pretty straight forward – but when it rebuilds the library – I am only getting about a third of music. Any special characters/potential problems I should be looking for in the XML? Thanks!!!

  352. Transferring from PC => Mac w/ a little .xml Search/Replace and a rm + touch on iTunes Libarary totally worked

  353. Thanks so much! I was so worried I’d lose everything when this spyware hit my computer and I had to back up to an external hard drive and clean out my computer… but everything’s still there, play counts and everything! The order of the Date Added is a bit scrambled, but it’s bearable.

  354. Am I missing something?
    Even with the box to let iTunes manage your music UNCHECKED, after changing the iTunes Library location just go to File > Library > Consolidate your library.

    iTunes copies all the files to the new location for you and maintains all the info (without renaming or reorganising the files as far as I can see). Then go and remove the old files from the old location after it’s completed.

    Only downside is it moves the whole library, podcasts, movies and TV shows included, but that wasn’t a problem for me cause it’s what I wanted.

  355. Bravo – thanks for the info. I’m not a fan of the naming convention and files structure that Itunes utilizes so I manage my music files myself. I could not believe during the Apple sanctioned backup process that it renames all your files and changed their folder location, so this method was a savior. Just transferred over my playlists and ratings between two PCs without a hitch in the same file structure and same file name convention. Two items worth mentioning again which are kinda buried in the long comments section above: (1) Use wordpad rather than notepad in windows to edit the itl and xml files as notepad can bog down with a large file; and (2) wordpad uses forward slashes ”/” rather than backslashes ”\” to identify the file, so use forward slashes on a PC when you are replacing the file location in the xml file (e.g. d:\Itunes\ should be written as d:/Itunes/ in the wordpad editor). Muchas gracias again.

  356. Helpful as hell, several times so far. Thanx!

  357. After doing this my ipod had a couple of problems with syncing and all the data became an unknown type. i dont know if this was related to doing this but i just had to restore the factory settings and sync it from scratch which took a while but ah well. all in all it worked so im happy. cheers

  358. Yay! thanks so much for this. My purpose was that I was NOT letting iTunes manage my music and wanted to change this and allow iTunes to manage my music. My music was in a different folder, and all the music files were just in there with no other subfolders. The music was already in my library; I didn’t want to add them again and have to delete duplicates. I followed your procedure but before I closed down iTunes, I checked the box to let iTunes manage my music. After closing down iTunes doing the find/replace in the xml file and blanking out the itl file, I copied all the files from the source folder to the normal itunes music folder. when I started iTunes back up, it automatically created the artist folders and moved the music to newly-created artist and album folders. This is exactly what I wanted. THANK YOU SO MUCH! And I like the resizable box on this comment. ;-)
    iTunes ver

  359. I went to lookup the yellow machine that Simon posted about and it seems to be gone! What are people using now for super large libraries, home network, and backup?

  360. Worked like a charm. Migrated from PC to Mac and worked like a charm:

    1. Backed up PC files just in case.

    2. On Mac with blank library told iTunes to move all music (even though there isn’t any) to my external drives” iTunes Music” folder. This creates the correct refernce in the XML file.

    3. Renamed the iTunes XML file on the Mac and deleted ALL other visible files under the iTunes folder on the Mac.

    4. Shared my PC MyMusic folder onto my network and connected to it from my Mac.

    5. Moved PC:\\MyDocs\MyMusic\iTunes\iTunesMusic to Mac:\\ExtDrive\iTunesMusic.

    *TOP TIP* There is an Automater script that allows you to Compare Folders. I set it to Compare my “iTunes Music” folders on my Mac and PC to ensure that they were in PERFECT synch. The link is here:

    6. Moved PC:\\MyDocs\MyMusic\iTunes to Mac:\\MacHD\Users\me\Music\iTunes

    7. Opened up both the Renamed Mac XML and the Moved PC XML files in Smultron (my pref text editor). Did a copy and replace on the file path for the library in the Moved PC with the one in the Renamed Mac XML file and saved and closed all the files.

    8. Renamed the iTunes Library.itl file to remove the ”.itl” part and then opened up in Smultron. Did Select All and hit Backspace and then Save and Quit. This left a 0Kb file.

    9. Ran iTunes on my Mac and my PC. On the Mac it rebuilt my library and when it had come up I had a perfect copy on each. All my ratings, my play counts and my last played dates are intact.

    Hope this helps clarify anything anyone feels may be missing. :)

  361. One great point… just put the warning before the step…

    That ma fault… not your’s!

    I just read the first step and that was exactly what I searching and trying to do… but after reading and doing all that I just read the downside..

    Lossing Podcast and loosing the time stamp.


    Just discovered that I wasn’t quite as clever as I thought I had been.

    For some reason all my have become disconnected so when I synched my iPhone it started removing them until I cancelled it.

    The Mobile Applications folder isn’t referenced in the XML that I could find, but you can fix it by clicking “Get Info” on each app at which point iTunes will tell you it’s missing and ask if you want to find it at which point you can browse to it.

    If anyone fixes this, or determines that it doesn’t break if you keep Music in its default folder, please post back.


  363. Thanks so much, This is the BEST site on the internet concerning how to do this!

    I had added 2 TB storage and configured my iTunes to use it.

    After 2 months I finally erased the original iTunes folder…..and ran into errors…..

    Thanks to this information, troubleshooting was made easy!!! (of course it took me 4 days to find it!)

  364. This is fantastic, exactly what ive been looking for, i moved my itunes library from XP to Vista and Vista will not let you create a directory on C called documents and settings so all my music was in limbo beacuse i didnt want to manually change 5000 files. this works on the newest version of i Tunes at this date.

  365. Hi there

    I’m not sure whether the above guide is going to help or not, so I thought I’d just ask the question!
    My scenario is as follows:
    I had a PC, with iTunes, where the music was on a second physical disk. And an iPod with songs on, synced from the (unmanaged) library. Sadly, the system drive failed, taking any iTunes settings with it. I’ve rebuilt the PC, installed iTunes 8, and rebuilt the library (in my own location again), but when I plug in the iPod it says “The iPod is synced with another library…Do you want to erase & sync this iPod”. Will this wipe the songs that are there, and if so, is there a way to get the iPod to sync without losing all the songs on it initially (& will this HowTo do that)?

  366. Andy: yes, syncing will wipe the songs that are there. No, as far as I know, there is no way to get the iPod to sync without losing all the songs on it initially.

  367. Thanks a million, had similar problem, moved music to new PC and though I changed the User Name to the same as on my old computer the folder under C:\Users remained the same and read-only so I couldn’t do anything (despite keeping the iTunes Library at a location mirroring the one specified in the paths). This saved my ass, or at least about five days of reconstructing all my playlists and the hair I would have torn out meanwhile.


  368. I have NAS drive and have ripped all wav files to \\MusicServer I manage the music through itunes. I do this on a PC winXP. I just got a macbook for home/wife to use and would like for both of us to manage the drive. itunes user is the same, but only buy a couple of songs here and there. In the new itunes I have got the iTunes Library.itl & iTunes Music Library.xml copied over, but the songs have that ! by 98% of them. How do script to get this updated without having to click on each song. PC laptop still in running if I need to export anything

  369. I’m older and new at this, and a first time bloger as well. I downloaded all of my cds to my nano IPod at work now I want to add music on my home computer and manage them on both computers. Is this possible?

  370. Thank you SO MUCH. After hours of Googling, trying and retrying I was about to give up… I printed your walkthrough and it went fantastically. So I’m very much obliged.

  371. I hadn’t read this article before using a usb drive to move my music from one computer to the next and I simply saved the itunes library.itl and xml files to the usb drive. I tried to add them to the new PC but it won’t let me… and now all the music that I had on my old PC are gone from itunes. Can you help me understand what happened or how to fix this? Thank you.

  372. Marilyn: no, not that I know off.

    Saskia: thank you for your kind words! You’re welcome.

  373. just making a quick comment here to add to the pool of knowledge/frustration – first off Konstantions, thanks for putting this together. I’ve got 33K songs, windows, and had made a huge mistake in adding a 2nd hard drive a few years ago when initial one filled up. going forward- keep on one HD, get a bigger one if you have to. ANYHOW, the point is half of my songs were on one HD, half on another, and this has made the “moves” a time consuming nightmare (i want to retain all the playlists and ratings). anyhow, long story short- following the instructions did work, BUT NOT COMPLETELY, on one PC. (about 10% of the songs just did not make it). this was a few months back. then i tried duplicating the same process, same source, to another PC. NO LUCK, after tweaking a zillion little things and reading all the comments, the xml file would constantly shrink and just would not recognize the 2nd HDs tracks. i realize i’m not typing the full detail here, but my point is – this is a frustrating process and it’s very possible that you will follow all the instructions correctly and still just have no luck. it’s really sad that apple doesn’t pay more attention to this issue as people migrate their libraries of music more and more to itunes.

  374. Clark: thanks for taking the time to write up your experience. It’s a bummer that this is happening to your library… I agree that the iTunes group over at Apple should have given our scenario/situation some more thought.

  375. It worked beautifully on my iTunes 8 :) Saved hours of my time I would have spent manually moving all the files … Thanks!

  376. Doesn’t work…. under 8. All of the dead tracks were removed in the rebuild of the iTunes library.

  377. It also removed all of the PODCASTS—I had many many many PODCAST Subscriptions.


  378. Worked perfectly for my iTunes 8, thank you very much for this

  379. Yoshi & Noelle: you’re both welcome!

    (George: read Yoshi’s & Noelle’s comments.)

  380. Thank you again and again and again!
    Your explanation keeps saving my iTunes’ ratings and playlists time and again.

    I just used it on my windows 7 64-bits and iTunes 8.something.

  381. Tiago: you’re welcome!

  382. THIS WAS FANTASTIC. I had a computer bomb out on me, and I had stuff saved in multiple folders backed up on an external hard drive. The combination of textediting the recovered .xml file and then clearing out the .itl file won the day.


  383. I don’t know what I did wrong, but everything is lost from Itunes…. 76GB of music and 37GB of music videos, all filled with the correct titles, year of release, genre, covers…. All gone. I think I will go and cry now…

  384. Okay, at least the information I added seems to be saved. So only to drag everything back, delete it from Itunes and manually find the right location again. A lot of work ahead….

  385. Didn’t work at all. Working from an external after iTunes suddenly stopped recognizing where the music was (nothing was corrupted, the music never moved. iTunes just sucks).

    Working with the newest (as of june 4th 09) version of iTunes, I’m really bummed. I’ve been methodically going through all my music to see what to keep and what to shed and the play count was important to that. All the metadata is gone.

  386. I just tried tested this and tried to move it from my computer to my laptop. Im going to do it for real when i get my mac but i wanted to see if it would work and everything worked and showed up the same as it was on my computer except play count and playlists. I dont know what I did wrong. I’ve tried to all different ways and nothings worked.

    I think i might be doing something wrong with importing the library.. I dont really know how and im not getting the same messages you said i should be getting. if someone could explain how i should be doing it, it would be much appreciated. Thanks

  387. okay nevermind i figured out my problem was my itunes on my laptop wasnt updated. After i updated it it work perfectly. Thank you so much for this guide it made my life a lot easier.


  388. Still works with iTunes 8.2, thanks for the tip!
    However, on top of loosing your podcasts subscription, you also loose the link to your iPhone / iPod apps. You need to reimport them from by dragging them from the folder iTunes Music/Mobile Application to iTunes.
    Thanks again for the tip!

  389. Alphab: you’re welcome & thank you for the iPhone/iPod Apps note!

  390. Great job !
    Many thanks, I have just done it and it works well.

    Just one question: It seems that I have lost all the covers except the ones that I added manually.
    Is it better to let iTunes finds the covers or is it better to add them manually ?
    Many thanks

  391. Damien: thank you for your kind words.

    RE: the album covers—unless I’m mistaken, it is better to add them manually since they’re added to the track’s metadata in a standard way. (But is it easier than right-clicking on a track in iTunes and letting the program find the artwork? Unfortunately, no!)

  392. I hope you can help, I made and Itunes mistake and instead of looking for help online, I tried to fix it alone and made matters worese. I recently built a new pc and kept my old ide HD with my 30gigs of music and installed the drive in the new machine. I then copied the files onto new sata hd and installed itunes, had it detect library. All was good until I decided to put all of my music into the my music folder, and now all songs need to be relocated. My fix was to uninstall itunes and re-install, when that happened, dupicate versions of each song appeared and they of course still require that I re-locate the file. Is there any hope for restoring my library w/o locating all 30 gigs of songs and deleating each double individually.

  393. Works well with Itunes 8. Except the Podcast Part: I had no Genre “Podcast” or any Podcast Media in my Labrary after autoreimporting was finished, so I added my Podcast folder manually to the library. After restarting Itunes my old Podcast showed up!

  394. I just want to move my podcast files and it turns out different than the OP (maybe because of v8)

    My step was:
    1. Copy the “iTunes Music” folder to your preferred. Mine was “E:\iTunes\iTunes Music”
    2. Change the iTunes Music folder location, “Edit ? Preferences ? Advanced” to the new location
    3. Before clicking “OK,” rename (or delete) your old old “iTunes Music” folder, so iTunes cant find it
    4. You’re good to go

    P.S.: I think this is because the library is rebuilt after you click OK button. Since iTunes can still see your old music folder, it retains the old files and redirect only the new files into the new folder.

    More P.S.: Also, before i try the step above, i tried to rename the podcast location in “iTunes Music Library.xml.” After reopening iTunes, the library file size returns back to normal: the moving doesnt successful.

  395. I wish I had followed these directions, but I followed Apple’s directions here:

    After moving the files, my new music folder on my external drive only has 17,000 files. The previous folder on my hard drive had 26,000 files. However, they both take up 134 GB. Any idea why I show fewer files but it takes up the same amount of space? I am trying to figure out if I’ve lost any music or not.

  396. Brilliant! I almost lost my playlists and ratings without considering “Part 2” of the transfer (thank god for backups!) I’m not really worried about the timestamp issue so this was a perfect fix! Thanks again.

  397. OMG! I was dreading dealing with “the move!” I bought a new computer and have all my music on an external drive. Of course, the drive letter changed on the new computer, so I just knew it was going to be a nightmare dealing with iTunes.

    Oh no it wasn’t! I spent more time reading this page than performing the process!!! I am amazed and THANK YOU so much.

    All my software has been installed on my new computer and my daughter will be happy mom doesn’t have to say, “Well, I haven’t gotten to dealing with iTunes yet.”

    Yipee!!!!!!!!!!!!!! :)

  398. Rosie & Paula: glad you found the HOWTO useful, thank you both for your kind words.

  399. it worked perfectly. thank you so so much!

  400. Diego: thank you for your kind words.

  401. Hi, I tried this and can’t seem to see the applications that i bought (and also the podcasts..I’m using itunes v8 and when i went to preferences, i didn’t see the ‘show genre when browing’ checkbox. the music have settled ok – it’s just the apps and the podcasts.. help appreciated! thank you..

  402. it’s ok now.. i followed anadvice that says just drag them to the library and that’s what i did…seemed to work fine.. now, will just need to sync the ipod and see if everything’s going to be there..

    i’ve been looking for the quickest way to move my itunes music and this site has been useful..

    now that i’ve moved my itunes library from laptop at work to an external drive, just need to figure out a way so i can sync the same library using my home laptop. will see if the same instruction works (or just copying the ‘newly edited’ itunes folder is enough to do it..


  403. Konstations,
    I hope you can assist, i received a playlist from a friend for my sons new ipod.
    The playlist was copied onto an external hd, into the music folder, which had about 400 gb of mp3.
    When we went in to listen to the mp3…they had all disappered…..pure Panic….Please let me know how i can find the mp3’s….
    ..Thanking you in advance

  404. Sven: I don’t think I can be of assistance, sorry. Too many scenarios may be in play here and as a result, I don’t even know where to start from. Hope you do find a workaround though!

  405. Lost iPhone apps and podcast subscriptions after relocating music:

    I am using iTunes 8.2 and I have music for which I do not have iTunes manage. The music is located outside of the iTunes folder on my local PC. I have created playlists which include those songs. I have an iPhone 3GS for which I subscribe to podcasts via iTunes and for which I have purchased a number of apps. I am interested in moving the music files to a newly purchased NAS drive. I have a new folder on the NAS drive mapped to my PC as the Z: drive. I am intending on keeping the iTunes folder on my local pc.

    I do not wish to have iTunes manage those songs, so I do not want to have iTunes copy them to the iTunes folder and perform consolidate.

    I followed the instructions for method 2 by doing a search and replace in the library XML file for all the songs outside of iTunes. I am keeping itunes folder on my local pc.. I replaced the paths with the new ones. I also replaced the itl file with 0 byte file. On starting iTunes, it recognized the itl file as being corrupt, and rebuilt it from the modified XML file.

    This worked great for all the music but caused the following issues:
    1) iTunes no longer showed any of my purchased iPhone apps being present in iTunes.
    2) The previously hidden podcasts videos playlist (which normally just appears on my phone) was now visible. Also a second new playlist called podcasts appeared.
    3) The podcast list under library in iTunes which shows my subscribed podcasts is now blank,

    I have temporarily reverted back to my original XML and itl files until I resolve this issue.

    Does anyone know how to get around those issues or another method to move music without having to consolidate my music under iTunes?

  406. Bcadle,why not uncheck the option in your iTunes preferences, “copy files to iTunes Music folder when adding to library”

    Then select all the songs on your “Z drive” that you want to add to iTunes library and drop them into the Music list or a new playlist folder in open iTunes application on your desktop

    Then iTunes will have the all the song information that is needed to play this music without having physically copied these files into the iTunes music folder.

    When that job is done then you can leave the option unchecked or re check it again.
    Your music files on Z disk will remain uncopied regardless of what option you pick.—————————————————-
    In general, moving a whole ITunes – library – playlist info – iTunes music from one computer to a new computer is a doddle and clear instructions without any mods needed to any file are available, on iTunes support pages.
    What I do, is delete any iTunes application on the new computer, copy the ITunes music folder complete into where iTunes is usually kept in the new computer, download iTunes and install it. And Voila, everything is duplicated in iTunes, playlists info etc.

    If you want to move ITunes and an iTunes music folder which is on an an external disk.
    Then follow the above info but also copy all the music from the external iTunes music folder from the ext disk into the iTunes music folder which is inside the iTunes folder
    Dowl iTunes and install it and instantly all songs and playlists will be available.
    iTunes will automatically accept the existing iTunes music folder as its default folder and immediately accept all library info in the ITunes folder.
    Installing a new iTunes will not overwrite all existing files.

  407. Macintox: every now and then, someone will drop by the comments section of this entry and mention that what we spend 10,000 words describing can be done “easily”, explaining the “process” (notice the quotes) in a line or two. Today, this guy is you. With that in mind then:

    “If you want to move ITunes and an iTunes music folder which is on an an external disk. Then follow the above info but also copy all the music from the external iTunes music folder from the ext disk into the iTunes music folder which is inside the iTunes folder. Dowl iTunes and install it and instantly all songs and playlists will be available.”

    Two questions for you:

    1. Does the following aforementioned process indeed keep all the playcounts & playlists of tracks from the external drive? (I don’t think that “yes” is out of the question, just checking.)
    2. Most importantly: you’re suggesting copying music from the external hard drive to the primary (“main”) hard drive. For many of us with large music libraries, using the primary hard drive for music is a no-no due to obvious capacity limitations. (This is what drove us to using an external hard drive in the first place.)

    So, we need a solution that (a) skips the “just copy to another drive!” part & (b) allows us to keep our music where it was originally located. What Schmolle & I have written does exactly that. What you suggest—unless I’m mistaken, and I may as well be—doesn’t.

    So yeah, this is far from a “doddle.”

    Don’t get me wrong; I appreciate your taking the time to post a comment and help another fellow who’s having problems with iTunes. It’s just that I’ve seen the “that’s easy! do X & Y and you’re done!” so many times it’s become a sensitive spot for me. Thanks again for taking the time to add your comment to this entry.

  408. The first question is poorly written, I don?t quite understand it.
    “Does the following process indeed keep all the playcounts & playlists of tracks from the external drive?

    But If my guess is correct and you meant to write preceding instead of “following”,
    then the answer is an emphatic yes.
    Playlist info etc. is kept in the iTunes folder on your startup drive.
    If you have ITunes application opted to use a folder on another partition or hard drive to store the music files, then only the music files are kept there. The playlist info is kept in the iTunes folder on your startup drive/ primary drive. iTunes has only just been directed to store the music files on the external drive.

    What can be done easily are the two scenarios I outlined with the methods I described and all the time consumingly created playlist info will be preserved and be displayed as it was previously.
    Q2 capacity limitations?
    Hard drives are now quite large and maybe there are plenty of people who have enough space on say a 1TB drive to contain their music files without having to have an external disk connected.
    An maybe the ext drive can be used for occasional back up.

    ” we need a solution that (a) skips the ?just copy to another drive!? part & (b) allows us to keep our music where it was originally located”
    I did not think to offer another solution for that issue but seeing as you ask :)
    If you want to move iTunes to another computer and using an external hard drive, even the same external hard drive, to store the music files
    then my description will still work and preserve all the playlist info.
    All the playlist info is contained in iTunes music folder on your start up disk.
    Copy that to your ext drive or whatever.
    Delete all iTunes from your new computer and copy your duplicated iTunes folder into your new computer, into the same location, attach your external drive with iTunes music files, download latest iTunes and install.
    The new iTunes will display all the playlist info. Just the same as when you install an update of iTunes which Apple will pester you about. Can you imagine the storm if installing an update wiped out your playlist info?

    Sorry if I have butted in, I only thought to give an answer to Bcadle, which I hope was clear enough.
    And what brought me here? it just so happens that I am moving my iTunes library and had a blank as to what what I did last time :)

  409. Macintox: thank you for the reply.

    “If my guess is correct and you meant to write preceding instead of “following”, then the answer is an emphatic yes. Playlist info etc. is kept in the iTunes folder on your startup drive.”

    A-ha, I see. (That pretty wild guess would be correct, BTW.) I’m aware of the fact that all of the metadata is stored in the iTunes Music folder (regardless of whether you actually keep music files in there or not); I hadn’t realised that when you were talking about copying music from the external drive to the iTunes Music folder, you were referring to the drag & drop method you described in the first paragraph of your previous comment. I was thinking you meant actual file transferring from one folder (drive) to another; my bad, thanks for the clarification.

    “Q2 capacity limitations? Hard drives are now quite large and maybe there are plenty of people who have enough space on say a 1TB drive to contain their music files without having to have an external disk connected. An maybe the ext drive can be used for occasional back up.”

    You’re forgetting laptop users. It’s a given that the prices of hard drives have fallen dramatically; I should know better since I’m surrounded by several external drives. But I cannot possibly store my music library in its entirety in my laptop’s hard drive. It’s a safe bet that I’m not alone in this.

    “If you want to move iTunes to another computer and using an external hard drive, even the same external hard drive, to store the music files then my description will still work and preserve all the playlist info.”

    My hastily-written previous comment is to blame for this. “Keep stuff to an external drive, but also allow for possible folder changes, etc. (i.e. the path isn’t exactly intact)”; that’s what I should have written before (and that’s where the “Search & Replace” feature of text editors come in handy, as I write in the tutorial). And unless I’m mistaken, what you’re writing above shouldn’t work here.

    “Sorry if I have butted in, I only thought to give an answer to Bcadle, which I hope was clear enough.”

    Oh no, as I said before your comments are appreciated and your intentions aren’t misunderstood. (It’s just the “it’s easy as pie!” bit of your comment that hit a soft spot.) Thank you for taking the time to add your tips and suggestions here; it can only be more helpful to other fellows facing the same problem. The hack that you are suggesting is indeed clever.

  410. hey everybody, first of all my thanks to the original guide, I did the whole thing and it went great.

    it is just that since the re-location I have a major problem:
    I can’t add new files to the library! I tried both drag-drop, and the wizards in itunes (including “add folder”).
    itunes just “ignores” those actions.

    it’s itunes 8, by the way.
    thanks in advance for anyone who may help….

  411. Hey I just wanted to thank by Konstantinos for breaking down the steps. I purchased a new computer last week and dreaded the migration from my old PC, but this worked out great.

    One thing that took me a while to nail down was the editing of the XML. In my case, I had multiple drives/partitions on my old system so I could keep music files separated from my videos and such. I had to do a find and replace a number of times before i finally got it right.

    I do want to point out that in original XML file, the folder paths were labeled with forard slashes instead of backslashes (eg. C:/Documents and settings/username/My Documents/Mp3), so I made sure to stick with forward slashes in my find/replace procedure.

    I still have not been able to recover my podcasts in the library but I’m not too worried about it. They were all free and I hardly used any of them.

    Anyway, thanks again for posting this page and making it easy for me get this accomplished.

  412. I’m sure I’m missing something but…. I followed the steps at the top very carefully and every time I open iTunes after renaming the file paths it gives me the message,

    ?The file ?iTunes Library.itl? does not appear to be a valid iTunes library file. iTunes has created a new iTunes library and renamed this file to ?iTunes Library (Damaged).itl?.

    Upon clicking “ok”, which is the only button available, iTunes makes a new .itl file and opens with none of my music in it, not even local music in the folder it states is the music folder.

    By the way this same message and action occurs if I only delete all contents of the .itl file without changing the .XML file at all. I tried deleting the .itl contents with wordPad, Notepad, and EditPad Lite.

    I can’t seem to get iTunes to rebuild a library with music in it in any scenario.

    I’m using iTunes running XP and am trying to move my music from an external hard drive to my laptop hard drive. (I’ve had to plug into the external hard drive for years every time I want to listen to music or sync my ipod.)

    Any help?

  413. I have the same problem as James. I’m running iTunes v8.1.1.10 on Vista. To add to the info Jasmes posted:
    The xml file went from 8MB (before and after doing the find-replace in WordPad) to about 22kB (after opening iTunes). I opened it in WordPad and the data tag for each category and playlist (music, movies, audiobooks, etc) now looks like this:

    I used Notepad to blank out the I hope this helps with the troubleshooting… has anyone found a solution?
    I sure am glad I backed it up first, thanks for the firm suggestion K!

  414. James: I think I may have found the solution!!
    For some reason my xml file was named iTunes Library.xml insetad of iTunes Music Library.xml. What you need to do is rename it to iTunes Music Library.xml after you do the find-replace with WordPad.
    Best of luck!

  415. That did it!!! Thanks Sarah! There was a file named iTunes Music Library.xml but it hadn’t been modified for a few months while the one apparently being used was the one named iTunes Library.xml. Just deleted the old one, did the global file location change, then renamed that one to the include “Music” in the file name. Worked great…Thanks. And thanks Konstantinos!

  416. CharlesAlvear: thank you for your kind words, glad the HOWTO proved helpful.

    James: cool! Glad to see the problem’s now fixed.

    And Sarah, thank you for taking the time to post here in order to help another fellow; rock on!

  417. Konstantinos Christidis is correct. Many of the assumptions Macintox made are not valid in my case.

    1) The files are put on an external drive because there is at least one user’s laptop that will be including the music files to their playlist. Also, and more importantly, the point on moving them to the NAS was so that I can have a single location that all the computers in the house can access the files. It would be a waste of disk space to have duplicate files on each and every computer. The reason they are on a NAS, as opposed to a PC that it is always powered up, is that the NAS uses less power and is quieter than a full fledged PC.

    2) The directory that contains the music folder on the NAS is mapped to a drive letter (the Z Drive) so the path to the music changed. Macintox solution does not work if the path to the music changes from something like “C:\Documents And Settings\XXXXX” To Z:\Music. This is obvious when one looks at the XML file. You can see that absolute paths are specified in the database.

    Now if someone can show me another solution which allows me to change the path to the music without losing my playcounts and playlists than please let me know. Alternatively if someone has a way to share music amongst all the PC’s in the house without duplicating the music files while simultaneously converting my computer to run in as low power and as quiet as my newly purchased NAS than I could use that method. Somehow I think the latter isn’t going to happen.

    BTW, I made it passed my previous issues with the apps and the podcast subscriptions by reimporting them back into itunes.

    Thanks so much Konstantinos for the only solution I found that remotely worked. It is ashame that iTunes does not have some path independent approach to keeping track of all music, apps , podcasts etcetera. Apple could have at least included a tool to move the music to another location without having to have iTunes copy the files into the iTunes Folder as an irreversible operation. I mean come on Apple, get a clue.

  418. bcadle: I appreciate your comment, thank you for your kind words.

  419. I love how much thought you put into this—kudos! Unfortunately, I can’t give you my take because I haven’t tried this yet, and I’m still hesitant about doing so.
    Honestly, I could caare less about play count, genre, etc…the date added is an important feature to me mostly because of its sentimentality factor. Though I read through your steps more than once, and then skimmed over a portion of the comments, I’m a bit too computer illiterate to fully comprehend what and how this is being accomplished.
    But now to my point—I like having iTunes manage my songs for me, and I also don’t have room in my D:drive for my music. I read something about simply transfering the .xml and .itl files from the previous machine. Have you tried this out yet? I’m afraid that if I try this, something might happen and screw up my iTunes.
    My hard drive recently crashed so I uploaded everything from my iPod and a very old backup disk.
    Sorry this comment was so long!

  420. Hi all, I wish I had found this site before I did exactly what I am reading that I shouldn’t have done! I have a PC and it was running out of room to hold all of my music. I copied the Itunesmusic folder and changed the location of the folder under the advanced options to an external hard drive. Now when I open Itunes, I do not have any music or playlists. How do I safely correct this?

  421. I tried this, and it worked great; playlists, playcounts, everything there, but my computer can’t find the location of the files. I think I may have mixed up something with Part 1, anyone have an idea how to get it so these files are found?

  422. Thank you soooo much!
    Works like a dream _
    You are a star!

  423. Stephanie: thank you for your kind words.

  424. Okay, this worked for me on a Mac running Leopard with Itunes 8.2.1 with one small difference: I did not select all and delete from the Itunes Library file (thereby damaging it). I simply did find and replace with the new path for the external hard drive in the .xml file and everything was the same as before! Even all playlists and podcasts were kept!

    Took me a couple of trial and errors to figure this solution out.

    Thanks again!

  425. wow, sike. actually that didn’t work… i’m retarded. what am i missing here? when I delete the contents of the .itl, nothing works.

  426. I guess I am just messing up the find and replace. What is the path to an external drive? I tried ://Volumes/(External Drive) with the space and this seemed to work but every music file came up with the podcast icon.

  427. I figured it out. Thank you for not listening oh digital world.

  428. hey everybody, first of all my thanks to the original guide, I did the whole thing and it went great.

    it is just that since the re-location I have a major problem:
    I can?t add new files to the library! I tried both drag-drop, and the wizards in itunes (including ?add folder?).
    itunes just ?ignores? those actions.

    it?s itunes 8, by the way.
    thanks in advance for anyone who may help?.

  429. Is it just easier to remove Itunes and re-install? I’m afraid…...

  430. I did this to copy my itunes library from my desktop to my laptop, using an external harddrive to store the music. The itunes library was fully created, but the songs have a weird icon next to them and they wont play. However, when I click on the mp3 file directly from the external harddrive, it plays just fine in the itunes library. Can anybody help me? Why dont the copied songs in the library play?

  431. Just did this with iTunes I needed to preserve all the files I had selected for syncing and it worked a treat!

    Doug, I suspect that you updated your xml file with the wrong path in step 5 of part 2. The little icon means that itunes doesn’t know where to find the files (it’s a little grey exclamation mark right?).

  432. Thanks for the advice and guidance. I now have successfully moved my 45gb iTunes library from one partition to another on my pc. Your guidance is exact, although I did of course have to delete the original files in order to free up partition space on the original location (after I’d copied them obviously :-) ) – that was brave, eh?

  433. I just tried this, only to encounter the same problem as James and Sarah did above. The problem being, I did not back up the XML file. This is because, following the instructions, I simply backed up the folder titled ‘iTunes Music’. Unfortunately this folder did NOT contain my iTunes library information (XML file etc). I am in no way blaming Konstantinos for my own stupidity, but I just thought that I would tell others of my plight before others experience the same thing. Again- be sure to back up the XML folder, if you mess it up and have no backup, there is no recovering your information (as happened to me, thankfully I am not too traumatized :)

  434. Brian: sorry about that. For what it’s worth, I do caution readers to backup everything… not just their music files. Nevertheless, I updated the original post with a note to make sure they backup the library files as well.

  435. thanx.. that was really helpful!!

  436. I was able to follow this procedure previously two times.. But the same is not working with iTunes 9 (

    I moved all the files under iTunes folder to an second hard drive (D:/Music/iTunes) and cleared the ‘itl’ file.. But despite that, everytime I open iTunes, it’s creating new ‘itl’ and ‘xml’ files in the default location (C:\Documents and Settings\Administrator\My Documents\My Music\iTunes)..

    This version of iTunes doesn’t seem to recognize the folder change we make under preferences.

  437. As Vish said above, despite the fact that you change the iTunes Media Folder Location to where you re-locate the library files to, iTunes still wants to look in the default location.

    I am using iTunes, and was finally able to get it to work by putting my music in the new location, but simply leaving the libraries in the iTunes folder in the default My Documents/My Music folder.

  438. I am very impressed and thankful!

    Easy and clear guide. Thanks a bunch, just what I needed!

    Unfortunately it didn’t work properly getting all the Podcasts, but those are easily re-downloadable.

    Perhaps you ought to do a guide on how to do this in the newer versions of iTunes, since it’s a little different.

    Again: Thanks!

  439. Bergur: you’re welcome. Thank you for your kind words.

    As for doing a guide for the newer versions; sadly, that’s not in my plans since I’ve more or less quit the “writing tech pieces” gig.

  440. cheers..worked out great…should be added to itunes help :)

  441. Hi there, and thanks for the great blog post.

    I’ve got a problem which iTunes 2nd line support don’t seem to be able to get their heads around. My old hard drive contained three folders – My Music, My Music (classical) and My Music (Oldies). All worked happily in iTunes, until I reformatted and reinstalled Windows XP a couple of days ago.

    I’ve tried the suggested approach and when I copy across the old data from the backup folder, I lose all the location information for the mp3 files that are in the second and third folders. Since I’ve got nearly 4,000 tracks, I really don’t have the heart to go through the “locate” function for all of them, including the playlists.

    So I tried zero’ing the ITL file, but it only recreated about 75% of the music files; a number of playlists were only partially complete, and two, which contained ONLY music from the third folder, were completely empty.

    Is there any way I can get the mp3 files imported and playlists protected?

    For obvious reasons I haven’t yet attached my iPod Touch, as I’m assuming that it’ll screw that up too!

    Many thanks,

    Trent SC

  442. Frightfully poor form to reply to one’s own post, but I found the answer, and if anyone else is dumb enough to have their music files in different location, this might help!

    OK, here’s what I did:

    1. Copy up the contents of …\My Documents\My Music\iTunes to a separate location.
    2. Reformat and reinstall Windows.
    3. Install and open iTunes. Go Through whatever start-up process it wants to.
    4. Close and uninstall iTunes, and remove the contents of …\My Documents\My Music\iTunes, but leave the empty folder in place.
    5. Reboot the computer.
    6. Reinstall iTunes and open it. It shouldn’t go through the start-up wizard this time.
    7. Consolidate the folder structure of my music files, so that all my music in contained within a single folder (although there are multiple folders in there!).
    8. Open the backed-up file iTunes Music Library.xml in EditPad Lite and find/replace the file locations for the moved files. I needed to add ”%20” instead of spaces. Save the file.
    9. Open the backed-up file iTunes Library.itl, delete all the content and save it.
    10. Copy all the contents from the backed up folder into …\My Documents\My Music\iTunes.
    11. Open iTunes.

    iTunes should then rebuild the ITL file from the XML content. In my case, it all worked fine: the music content from the three separate folders all played fine (where before iTunes couldn’t find about a third of them) and all the playlists are complete, which previously wasn’t the case.

    This is something that iTunes’ 2nd-line support said wasn’t possible – their only suggestions would have resulted in either losing the majority of the playlists, or having to manually locate about a third of my 3,900 mp3 tracks. They also weren’t willing to advise on editing the XML file.

    I certainly wouldn’t have got this sorted without having ploughed through this excellent blog – many thanks to the author and the many contributors.

    Trent SC

  443. TrentSC: thank you for the detailed write-up, I appreciate it.

  444. Hello,
    Thanks for this explanation, because I’m supposed to switch in the weeks to come (my new imac 27 will arrive in november !).
    With the latest version of itunes, do you think the option “File-Library-Library organisation-consolidate files” can move my situation from “Part 2” to “Part 1”?
    I tried a test and with this option all the music is copied in the iTune repertory : Do you think I just have to move the whole iTunes to the iMac and get the job done ?
    What happens to the iPhone and all the apps I baught ?

    Thanks for your help and this really helpful blog !

  445. Olivier: I’m not sure. It’s been a couple of years since I wrote about this trick and I don’t know exactly how the newest versions of iTunes handle it.

  446. Thankyou!

  447. Konstantinos,
    I’m going to make backups of my present situations (iTunes is not managing the library), then I will consolidate everything and try this (fast?) method. If this works, I will tell you. I it’s a mess, I will tell you also! (and then use my backups. But my iMac will arrive in few weeks, so if someone is ready to try before me

  448. Olive: that would be great. Hope everything goes fine!

  449. This did not work for me. WinXP. iTunes 9. It created a file “iTunes Library (damaged)” as you said it would, but then wouldn’t launch. Wouldn’t launch until I put the original library file back.

  450. So, was there a consensus as to what process works best if you’re transferring from a PC to Mac and all your music is on an external harddrive? If so please email me at

    I can’t figure this out for the life of me.

  451. Hokay, after doing this and then realising that iTunes9 doesn’t read the xml file, and just creates a new one, figured out how to get it to re-recognise all of my files – do everything the same until you have modified the xml file, but save it in a separate location. Once you’ve opened iTunes and are confronted with a clean empty view, import the xml file as a playlist, and all your music/playlists are there. Alas, have not worked out how to recognise already downloaded applications yet. Grrrr.

    (oh, and doing this with Chinese/Japanese characters has no problems either)


  452. Awesome simple and clear article dood! Works a treat for iTunes 9.x if you move from Vista to Windows 7.

  453. Simie: thank you for the kind words. Glad you found the HOWTO useful.

  454. Man, I struggled with this for ages- My situation is unusual in that I don’t use .mp3 files, only .wav format, and thus no metadata. So of course, all migration methods that rely on metadata failed completely and after a lot of pain (including trying to edit the .xml file and wondering why that didn’t work) I just figured this couldn’t be done. However, your way seems to work perfectly, especially since I don’t care at all about “date added”, playcounts or any of that- Just the track/album/artist info.

    You’re an all-time fuckin’ legend.

    Kudos and huzzah to you sir!

  455. Peter: woah, flattering words, thanks! I’m glad you found the HOWTO helpful!


    I’m so glad there are people out there willing to fix failed Apple programs. THANKS! ;D

  457. Rad: thank you for the kind words.

  458. Thanks for a great post. Just used this technique to rebuild my itunes library on a new computer, using all my music on an external hard drive. I can say it appears to work on iTunes 9 and Windows 7.

  459. Dan: thank you for the kind words, and thank you for updating us on the situation w/r/t iTunes 9 and Windows 7.

  460. Wow, this worked wondefully!

    I was doing the find/replace in the XML file, but every time I restarted iTunes, the changes wouldn’t take effect and the file would revert to its original state.

    I would’ve never guessed that the .itl file is where the data really is.

    Thanks! Such a relief to have figured this out. :)

  461. Absolutely unbelievable that this is not catered for in ITunes.

    Its worse when you just want to move a couple of directories around, e.g I have a pending folder full of music that I would like to sort into appropriate locations.

    Why is this so hard, why does Apple insist on making this so hard in Windows?

    Here is another one, say a file has been deleted from the disk and you get the little i meaning ITunes can’t find it, tell me how do you find out what the file path is? You can’t there is no “file path” column or property?? WHY WHY WHY, I am a developer and I cannot understand the mentality of the Apple team, it must be a Mac thing.


  462. Hi all,

    Very usefull site, thanks for the great work.

    I’ve a sligtly diffrent problem, relate to this. Appologizes if already answered, I tried to read it all, but I might have missed one.

    For three days, CD imports go on the local HD (... My Music …), rather to the defined library, defined on my NAS in Preferences. Does anyone knows how I can modify the destination ?

    Detailed history :
    I put my Music on a NAS, starting from a blank lib, just stating the position of the lib in the preferences. Did it with desktop home computer. It worked fine, and I was glad to put my 600th album (all lossless) before going to hollidays. I took the NAS with me. I came back, and made a little mistake when connecting back, because I statred iTune, the NAS not beeing ready. After starting the NAS, it worked all fine to play music (with files from the NAS), but each time I add a new record in the lib, it goes on the locac CD. And when i Select it and make consolidate, its jumps to the NAS !

    Thanks for your help


  463. I checked the “let itune organise …” and made a few consolidations. The local files were not automatically moved to NAS, but the later import went there …
    So the problem is solved for now …
    iTune is full of mysteries …

  464. Just wanted to provide a helpful hint to keep the original time and date information when switching over to a NAS/external drive. Instead of using the explorer window and “copy & paste” use the command line (cmd.exe) and xcopy. Example:

    C:\\>xcopy /E /Y /K “C:\\Documents and Settings\\USERNAME\\My Documents\\My Music\\iTunes\\iTunes Music\\*” ”\\\NAS-DEVICE\\Public\\Our Music”

    The /K keeps the original file attributes. The /Y is basically answering yes to the 6000 prompts during the copy, the /E creates the recursive directory structure. Please note that the quotes are necessary due to the spaces in the file names. Just completed the switch-over and all my album info was intact ;-)

  465. Bill: great tip! Thank you for sharing it!

  466. Hi,

    Just to point out that I transfered my itunes library from pc to mac using this procedure and it worked perfectly.

    I almost bougth one of those softwares to transfert the ipod to my hackintosh pro, but I remembered that before formatting the pc I saved these 2 files wondering that they migth be useful to recover somthing.
    Well, it was essential.

    thanks a lot!!!!!!!!!!!

  467. Brilliant! This works so quickly and simply, I couldn’t believe it. I partitioned my HDD and after moving my data to the new partition I had lost all my playlists. I felt really stupid, but thanks to a backup and these genius instructions I was able to fix it.
    Now if only someone can tell me how to make my Shuffle work again just as easily :-( (


  468. Has anyone tried it on Itunes 9 while doing a Windows 7 install? I copied all my music over to Win 7 and tried the library trick above, but Itunes only rebuilt the portion of my library that was purchased from Itunes. Everything else (95% of my music) was ignored. I really don’t want to create the playlists again…

  469. Another question about iTunes v9 and whether it all works. I used this process once before many years ago, but now need to move everything again. Just wanted to check before giving it a shot!

  470. Hey guys.
    Well- I read the manual from all above – exluding the comment concerning time and date stamps. Unfortunately these now seem to be lost – but somehow essential for my collection because there are many badly tagged tracks in there – making the adding by folder the only nice way to sort things – as iTunes still doesn?t have any sort by folder option. Which UPSETS ME :)
    Does anybody have any idea how I could reconstruct my playlist including the exact order? I?ve got the original .xml and .itl.

  471. Didn’t read all the comments, but a simpler (at least cleaner, less hacky) way to do this:

    copy your music folders from under the itunes music library to wherever you want them—> open iTunes and delete all albums that you want to move (answer yes to moving them to recycle bin)—> then add the albums from the preferred location back to iTunes via “File, Add Folder to library…”


  472. Brilliant! Worked perfectly. Chris B and Rex, I did it with Windows 7 and iTunes 9 – no problems. What a chore moving to a new computer is – can’t imagine having done it without this! Thanks!!!!!!

  473. Hey Joe.
    Thanks for this but the problem is I have a lot of tracks already rated and would hate to lose them as well ;(
    Maybe I?ve got to tidy things up manually, setting up playlists etc.

  474. I store all of my music on an external hard drive so re-adding it to my new computer was no problem (since it was in the same place…)

    Of course I’m missing all of my playlists and my track ratings. What’s the best way to remedy this? ( Windows 7, itunes 9)

    Many Thanks!

  475. Wow, I’m helping a buddy set up a new Windows 7 computer and told him I’d handle getting his iTunes library moved over from his old machine that runs XP. After reading through this I’m happier than ever that I don’t use iTunes myself, though I still am scratching my head as to what to do. Can’t I just back up his iTunes folder to an external hard drive and then have the new computer grab the library from there? Just scanning the comments above makes this seem horribly convolute. Thanks.

  476. Thanks greatly for this tip.
    I can also confirm this works on iTunes on 64-bit Windows 7.
    Note (like a post above) after I zeroed the “iTunes Library.itl” and started iTunes nothing happened. I could see it running the in background, but I got no user interface (I minimized then closed all windows to be sure). I left it for 12 hours – still nothing – I had given up. Then miraculously after doing some other work I found an iTunes dialog hiding under a window asking me to repair iTunes … and voila – all tracks/ratings recovered!
    FYI. I suspect the dialog was hidden from the desktop and become visible only because of some system event (I can only think it was either; inserting a USB drive which presented a dialog with how to open the files, adding a Windows Component from Control Panel which asked for a reboot, or installing Windows Updates which presented a restart dialog).

  477. Worked for me using iTunes 9 on Win7×64, thanks!

    FWIW, I have written some perl scripts in the past using the iTunes COM API, so I was thinking I’d do the same thing here. Alas, there is no way to modify Location() (the path to the file) via the API (nor can you modify DateAdded()). Still, most of the fields can be modified, so if someone were so inclined they could write a script to automate some or all of this process – i.e. save all the metadata, remove and replace all the tracks, and update the new tracks with the old metadata (with matching based on trailing pathnames). I have a script that syncs iTunes/WMP metadata in a similar way that could probably be adapted to the task. Not sure if this would be any better than the method above, although it could probably avoid the podcast and column layout issues.

  478. Todd: thank you taking the time to leave a comment.

    That sounds very interesting indeed; if someone could come up with such a script it would be a tremendous help to all those iTunes users facing this problem.

  479. Hi,

    I’m about to do this migration from one laptop to another running Windows XP and ITunes Vers

    I think I’m nearly ready but I’m a bit nervous about editing the .xml file, mainly because when I open it all the ”\” I expected to see in the path are represented as ”/”, which means that the screenshot for the global search and replace won’t work. Any ideas on this? I’ve read that I do need to include ”%20” as spaces too.

    All help greatly appreciated. Steve.

  480. That comment didn’t work like I’d hoped. It should read that all the back slashes \ in the xml file appear as forward slashes / which doesn’t match Windows path names….thanks.

    e.g. file://localhost/S:/MP3%20Albums%20-%20Main%20Library/

  481. SteveR: in that case, experiment with the schema that’s already in place (i.e. the “file://localhost/...” one) and do the corresponding search & replace. That’s what I would do if I were in your position. (Please note it’s been a few years since I last tried this process and wrote about it.)

    At any rate, keep backups!

  482. Though i did not read through all the comments i had a different problem than is tackled here but i was able to combine the two solutions and add one more which i will describe in detail.

    I lost all my music because the iTunes managed library on a secondary HDD was lost due to HDD failure. Everything was on there! Luckily, my music was backed up on my iPod and my .itl was undamaged on my main drive! After purchasing a new HDD and creating a new music folder:

    Step 1: Copy my music back from the iPod.
    I hesitate here because I wonder of things would have been different had i not used iTunes without my music and more importantly the file structure being there. I digress, needless to say:

    Step 2: Point iTunes to the new music folder with all the music in it.
    At first glance it worked! exclamation points gone, highly rated playlist filling up! This is a playlist containing 4-5 star rated songs, thus proving the ratings are intact.

    Weird problem occurring: some of the songs in the rated list have exclamation’s!?

    I can’t imagine why so i look closer and find close to 30% of my library is pointing to the wrong folder! (users/itunes/itunes music).


    The only solution seems to manually point each song to the new location… but it’s a nightmare because there seem to be about 2024 songs with bad location strings.

    I find this site and immediately close itunes and open the 10,573k library.xml file to perform a find & replace. For those who are unfamiliar with find and replace it is basically tool that Word and many other programs have that finds an exact phrase you type and replaces it with one you want. eg:find their and replace with there it will find all the their in your large document and replace it with there the trick is sometimes you want there and other times you want their. This caused another problem which I explain below.

    Word (from Office 07 on vista 64) cannot open a file this large or the .xml (lawsuit fallout? haha j/k)

    anyway, notepad opens the 10.5mb file with ease so I cut and paste it into an open word .docx for the find & replace function.

    I run the find for:

    and replace with:


    Then I fix the .itl file then save and close it.

    Opened itunes and it rebuilt my library and it worked fine!

    But i noticed some songs missing now, less songs than before but they weren’t even in the library anymore.Some songs are gone from the library alltogether, I check the xml and it has dropped by 30%, my lib.xml file is only 7.5mb now

    First I tried the process over again from a backup i created of the untouched lib file, hoping I made a mistake. I got the same result.

    I did confirm that out of roughly 6200 songs, the ‘find and replace’ made 2024 corrections and further went to check that some of the files were fine that originally had a bad location string. Here is where I found something interesting:

    some of the original library files were pointing to C:/Users/mycomp/Music/iTunes/iTunes%20Music/ and of course it was changed to W:/Music/ however some of them, specifically songs that were a part of compilations were pointing to W:/Music/compilations/alubum as opposed to the fixed files which were W:/Music/artist/Album

    So that’s it: the problem was that the iPod’s file structure was apparently different than iTunes Library file structure when referring to compilations.

    unfortunately there is no find and replace with a variable which is determined by each song (record/ key). Not in word anyway, so i am currently working on a short script which will find the word ‘compilations’ and replace with the ‘artist name’ based on the record in which it finds it. (im sure there is a better way to describe this, sorry).

    Astonashingly, the folder compilations is in the iPod, but there are only 3 songs in three respective folders yet i have thousands of songs in compilations based on what the lib.xml points to.

  483. oops, typo city

  484. If anyone uses the NTFS file system I have a fast way to move your existing directory structure in no time using junctions. Junctions are basically invisible links to folders elsewhere in the file system. I have not been able to make it work with mapped network drives though.

    I have a dedicated F: drive for mp3’s and iTunes libraries I use. The trick I use is not to “move” it but to redirect where windows “looks” for the data or mp3’s in this case. After running the proper command the data will be accessible from both locations as if there were actually there. That means a change in either places affects the file directly as each file technically only exists in once place.

    Google ‘junction’ from sysinternals and download it. Extract it and from that directory open a command line.

    Command I used to get the default iTunes folder to point to “F:iTunes db” is:

    junction “C:\Documents and Settings\Mario\My Documents\My Music\iTunes” “F:\itunes_database”

    Make sure you use quotes if any spaces are in the paths.

    Using this method, you cam move your root mp3 directory wherever you want without doing anything in iTunes.

  485. Mario: that’s a great tip. Thanks for sharing!

  486. Thank you for this guide. It was very helpful. I successfully moved everything from my pc to Mac.

    it moved my iPhone partnership too. This meant I could keep ALL the data on the iPhone and now sync with my new Mac. GREAT! Please, share this in your article, I think it will make a lot of iPhone owners happy!

    Thank you again!

  487. When I tried this with iTunes 9, I made all the needed changes to the .xml file and then the new .itl file was created, but iTunes stated “Your database file appears to be corrupt, a new one will be created and called ‘XX iTunes Library (Damaged).itl’”. Thus it just created a new blank file.

  488. Shoe,

    I have the same problem.

    Speak up if anyone else does. I’ll let you know if I solve it. I am going to try installing an earlier version on ITunes9 and then if it works, upgrading then


  489. No need to reinstall or downgrade.

    I had the same problem and was searching around for solution when it occured to me that there’s an option to export the library.

    If you can export the library then you should be able to import it too. And you can. Here’s how:

    You do the same as described above but first make a copy of the .xml file and rename it something new – I called mine m drive iTunes Library.xml as I was moving to the M: drive. Afte trashing the itl file itunes starts from scratch so when you start it up it creates a new .itl and a fresh .xml. Next select import playlist (it’s not just for playlists!) and select the renamed xml libarary file. It will take a while but eventually your library will be restored and in the same new location too.

    It’s Apple approved!

  490. I had the same problem with 9 and I was frustrated that this has changed until I read all the way through these posts.

    The trick is to import your modified library. In fact Apple tells you how to do this already :

    Even if you manage your own library in terms of where the files are stored you can still reimport your edited .xml file.

    I had a problem because I had added tracks to the library on one computer which mapped my NAS to J: and trying to find them on another computer which mapped my NAS to M:. The library had most of my files on the J: path so I had to do a global search and replace of J: to M:.

    I realised afterwards that I could have just removed all the songs from my library and reimported the modified .xml rather than trashing the .itl but that’s what the Apple help said to do as well so I didn’t think it through.

  491. fantastic thread. amazing detail and great additions to help all. Thanks too to Steve Norgate for the additions

  492. Thanks you SO much for this post—

    I’m not at all computer saavy—and still use itunes to deal with all my music. But thanks to you I was able to correct a horrible error I made attempting to transfer storage of my music files from Mac ibook to a Lacie drive. (I originally simply changed the settings w/n itunes for where music is supposedly located, then dragged and dropped the music files into a folder I created on Lacie, and deleted the old music files from my mac). Of course at that point iTunes was no longer able to locate the music files and I was looking at having to manually locate every single song.

    But this fix worked perfectly. A tip for the non computer savvy out there—in order to figure out what exact wording I needed to replace the location entry with I first did a test where I dragged a song from lacie drive directly onto open ITunes application. (To itunes this is as if I added a whole new song). I then opened the iTunes music library file in a text application, did a search for that song (the version that was on the Lacie obviously) and copied the exact phrasing that followed the “location” entry, so that I would know what to replace all the old mac location entries with… worked like a charm!

  493. I think I’ve gotten the path wrong on my xml.

    itunes on my new mac didn’t display any of the tracks.
    Given that I’ve owned my Macbook for all of a day, what do the paths looks like?
    I am essentially moving music from my windows pc (d:/Mp3s) to the default directory Itunes directory in OS X.

  494. Wow! This was exactly what I was looking for and worked like a charm! Thank you so much!

    P.S. – My problem was i had copied all the music onto the new computer’s HDD but did not know how to get the ratings back till this.

    Fantastic job :)

  495. Thanks for this great posting! Still works in 2010, four years after original post. I just used this method to rescue my iTunes on a PC with window XP. It couldn’t find any of my songs after I had to remap the drive letter on which My Music and iTunes folder resided on. After backing up the entire library, iTunes Music Library.xml. and the iTunes Library.itl, I did find/replace for the drive letter in the xml file. I then deleted the entire contents of the .itl file and resaved it. When I reopened iTunes, it said the library was damaged and it created a new .itl file after it asked me. I wonder if it would work just as well to delete the .itl file instead of saving an empty one.
    In any case, thanks for a really useful post!

  496. Waynestrout, Celina, Gaurav & Lon: thank you for your kind words. I’m glad you found the instructions helpful!

  497. you saved me—thank you so much, was just about to give in and start from scratch with my collection, after moving files without thinking.. have hundreds and hundreds of playlists on multiple disks ,and was dreading the idea of rebuilding everything..:)

  498. Just an additional note how to move single files (a few) with iTunes on Windows (I guess it works with other versions as well, but haven’t tested it). I don’t let iTunes manage my files, which are not in the iTunes folder (I have them on my NAS, but it doesn’t matter where they are). But when I buy from the iTunes store, files are put into the iTunes folder automatically and get a file name I’m not happy with. But you can simply rename the file with Windows Explorer or move it to another location while iTunes is running but not playing the file you want to move (to locate a file easily use the context menu or Ctrl+R). The item gets an exclamation mark icon as soon as iTunes realizes that the file is not existing any more. As soon as you try to play it iTunes asks you where it is, and you can select the new file name (make use of copy & paste to navigate to the folder quickly). You don’t lose any information (like the date when the file was added). It’s a bit cumbersome for a lot of files, but if you want to move a few files it works great.

  499. works awesome with iTunes9.1 and windows 7, THANKS!

  500. Worked perfectly with Windows 7×64 and iTunes 64-bit!!

    Thanks a lot this saved my life!! Awesome guide!!!

  501. Joe, Scott & Ankit: thank you for your kind words. Good to know the instructions were helpful!

  502. Hey,

    this worked out. with some modification!!

    my task:
    i wanted to migrate my windows7 – itunes 9.1112 lib—> sl 10.6.3 on mbp 15 i5 – itunes 9.1112 ..

    but when i launched itunes after erasing the complete .itl content, it didn’t try to recover it, but just opened itunes and replaced my .xml and .itl and itunes was like outta the box..

    i tried this and that and finally, i deleted just half of the content of .itl


    it worked out! it even moved played count etc.. now everything is added the same time, but i dont care about this.

    thanks for the step-by-step-guide that made my next weekend.. was so close to give in :)

    bye from germany

  503. Thank you. Thank you. Thank you.

    Similar problem to Marcel_germany. Also involved an abandanod migration to Winamp. I could restore my songs but not the playlists until I discovered the XML file and your great guide.

  504. I am using iTunes on a new install of windows 7. After blanking the .itl file and changing the paths in the xml file, it gives the message saying that the .itl file is corrupt and then opens itunes without rebuilding the library. I just have an empty library.

    Any ideas?

  505. It worked for me under Windows 7 with iTunes 9.2. I also got an empty library at first but simply had the wrong file name of the .xml. Thanks a lot!

  506. This kinda worked except the last part, which seemed to be an older version of IT?
    Also, you say to open the file, but not how. So I assumed to do so in text form.(?)

    *But what I do not understand is, why did I have to change the file texts and go thru all this, when I have IT managing
    my music, and it did not fix it automatically?

    *Also, why did I still have to add the new folder once I changed the location?
    Why did it not simply (re)add all files when I changed the file location?

  507. opened the itl file in notepad and deleted everything, edited the xml file to point to the new location and… It all worked. Thanks a lot!

  508. this is stellar! thank you!

  509. Worked for iTunes v. 9.2.1 for Mac
    ? 25,000 songs
    ? 2.25 hours for iTunes to process xml
    ? 1.5 hours for iTunes to determine gapless playback

    imnothere’s instructions look even easier, I wish I had seen that earlier.

  510. Russ: thanks for the update! I’ve added a note in the original post.

  511. @Josh

    just edit the .xml to your new file path (or your new username) using search and replace and keep the itl the way it is, when you open ituens, all your playlists and such should be there with play counts but it still cant locate the files, locate one file in a folder and it will fill in the rest for you, closest solution i can find,

  512. Easy Peasy Japaneasy. Thanks for the instructions.

  513. I am considering moving my music to another drive, again. I currently manage my own folders, but this is, at least, the third time I have relocated my music in the last several years. I am caring less and less about managing my music folders myself and am considering having iTunes do it for me. So my question is, can I simply check the box “Keep iTunes Media folder organized” then do the simple process (part 1)?


  514. “Open the “iTunes Music Library.xml” and do a global search and replace with your text editor of choice. A screenshot of how this is done in EditPad Lite, a freeware text editor that?s light and powerful follows after the end of this list.”

    You don’t specify search for what and replace with what. Although I know the answer, not everyone will.

    Thanks for this resource.


  515. McKack: you’re welcome!

    D Rubenstein: thank you for pointing out this error, you are correct. I’ve updated the guide according to your suggestion.

  516. “I am using iTunes on a new install of windows 7. After blanking the .itl file and changing the paths in the xml file, it gives the message saying that the .itl file is corrupt and then opens itunes without rebuilding the library. I just have an empty library.”

    I’m in the same boat as Josh. Help!!!

  517. Thanks for the good and detailed descriptions! I just followed your procedure and it worked except for one thing: i’ve lost my album artwork and have no clue how to get it back.

Add your comment

  • "link":
  • *bold*bold
  • _italics_italics