Whoohoo! My new hardware has arrived, last week. I’ve been busy playing with it so that explains the small delay in posting.
Right now I am still going through the tedious procedure of getting everything the way I want it. I have a local network so I can access my old PC. However, dragging my external HD between the two machines is much faster.
Tediousness includes copying my itunes library. Tricking itunes into accepting the old library is somewhat of a challenge. But that’s what’s google is for. Since I found google’s answers a bit disappointing (lots of drag this folder there type of stuff from Apple users), I’ll post some detailed instructions for real users who do not “consolidate” to the itunes folder but choose to keep their music organized manually. To add some difficulty, my new machine has no second harddrive so the paths are different after copying.
If all goes well everything is moved (music, playlists, play statistics, ratings) AND I can sync my ipod with the new pc without that requiring it to be wiped and refilled with the moved library. I’m moving the library, not recreating it.
The Itunes library consists of only two files, its own itunes music folder and whatever external directories you imported (two in my case). One of the two files is a binary file, the other one is an xml file with data on all your songs, including path names, statistics, ratings, etc. Essentially, the xml file contains everything we want to migrate except for the mp3s. Unfortunately, moving the itunes library is not as simple as copying the files to the new machine. Sadly, Apple deliberately made it hard to do what you are about to do. So here’s a step by step guide (windows specific though Apple probably is about the same):
- At all times, keep at least one intact backup of all files mentioned in this post. Never work on the originals. Preferably, leave the original library untouched, you can always go back to that.
- Start by copying your mp3 folders to your new machine. That may take a
while. Make sure they are where you want them to be. It took 20 minutes for my folders using an external HD, not
counting the time it took to create the backup from scratch on
the external hd (basically I used my incremental backup). Also copy both Itunes files (xml and itl) and the itunes mp3 folder (if not empty)
onto the external hd. - Now dowload, install, run & close itunes. It will create an itunes
directory for you the first time it starts, that’s where it will look for its files. Replace the stuff inside this directory (My Documents\My Music\iTunes) with the
backups on your external hd (including the itunes music folder). Now here comes the tricky part. Thanks for
this post for putting me on the right track! DO NOT start itunes again until after the steps below. - First fix the pathnames in the xml file. They still point to the old location. Open the file in a capable editor, the thing to look for is search and replace functionality. Search and replace the parts of the path names that are now different: your itunes music folder and any other folders you imported in your old library. Save the file.
- Now this is important: iTunes will ignore whatever path info is in the xml file! Unless the itl file becomes corrupted. We can fix that! Open the itl file in an editor, delete the gibberish inside, save. Your itl file is now corrupted, normally this is a bad thing. You still have the xml file though (and a backup of the itl).
- Start itunes, it will ‘import’ your music and afterwards complain that the itl file is corrupted, let it fix it.
- Check if everything is there. In my case I messed up with the search and replace and some files were missing. Just go back a few steps, copy your backups and retry.
- Done. Everything now is on the new PC. What about the ipod? Just plug it in!. You already installed iTunes on the new machine so you have the drivers for your ipod. The key or whatever itunes uses to recognize you ipod is in the xml file. And now also in the recreated itl. Apparently the xml file is sort of a backup of the itl. I suspect the itl is a bit more efficient to manipulate programmatically. I have no idea if this preserves any itunes store stuff you purchased. Presumably, this involves deauthorizing your old machine and authorizing the new one. I never used the itunes store so it’s not an issue for me.
The only thing I lost in the transition is some iTunes preferences that are easy to restore. For example I had some of my playlists set to shuffle. The imported playlists no longer had the shuffle enabled. Big deal. The preferences probably aren’t part of the library. I noticed that the shuffle settings do not sync to the ipod either. This is annoying actually because the shuffle settings is deep down in some menu on the ipod and I only want to shuffle playlists. I like my album songs served up in the order that they were put on the album.
I’ve used winamp for most of the past decade (I think from 1996?). Only when I got my ipod a few months ago, I started using iTunes, by choice. There is an excellent winamp plugin which will allow you to sync winamp with your ipod. Presumably, moving a winamp library is a lot more easy since winamp uses a file based library rather than a database. However, the main developer has left AOL, so winamp development seems a lot less interesting these days. AOL seems to just pile on commercial crap with every release. So I’ve given up on it for now.




















#1 by pretzelmonster at February 16th, 2006
Hey, I just wanted to tell you that this even works for moving the itunes library with all ratings, playlists, etc. from PC to (Intel)Mac. Same steps, after copying the music, just replace the string “file://localhost/C:/Documents%20and%20Settings/{User}/My%20Documents/My% 20Music/iTunes/iTunes%20Music/” with “file://localhost/Users/{User}/music/iTunes/ iTunes%20Music/” in the PCs XML file, copy it over to the Mac, empty the “iTunes Library” file (same as “iTunes Library.itl” on the PC and restart itues. It reimports the XML and you are done!
Kind regards, pretzelmonster.
#2 by Jilles at February 16th, 2006
Good to know that it works for pc -> mac type migration as well. I still wonder about the purchased music.
#3 by klessa at April 27th, 2006
First off, I’m thrilled you wrote this out in such detail. However, I’m running into some hitches so wanted some clarification.
My ‘deal’ was that my Windows 2000 PC, with its 50GB worth of music and videos for my iPod, got trashed recently. The disk data was fine, it’s just the boot record that got hosed, and after many attempts I gave up and bought a new laptop (overdue for an upgrade anyway).
So… I decided to attach the itunes library files as an external firewire disk to my laptop. My entire directory of files was be located at:
c:\Documents%20and%20Settings\KLESSA\My%20Documents\My%Music\ITunes
I got to step #3… and I specified:
F:\MusicFiles\ITunes
as the folder where my music should be.
When I exited Itunes, that folder was left empty. I didn’t think from your directions that it should have. However, I copied over the .itl and .xml files, and edited the .xml file as you said, with the replace… took forever. However, now when I start back up itunes, in spite of ‘corrupting’ my .itl file, it never asks me to build the libary. Do you need to first delete all the old library files it saved already?
Thanks for any assistance…
#4 by Jilles at April 27th, 2006
I sure hope you still have a backup. Anyway. The idea of step 3 is to let the new iTunes create a new library (empty) and then replace it with your old, corrupted library.
In other words the itl and xml file should be where the new iTunes expects them, which is probably on you C drive and not on your F drive.
BTW. replace goes a lot faster with an editor that supports search & replace all.
Good luck.
#5 by klessa at April 27th, 2006
I used your recommendation, jedit, nice quick editor — worked quite well.
Okay, here’s the deal (and I do have backups, whew!).
I have my itunes music files saved on a disk.
I want the itunes library to end up on the F: drive, I don’t have room for them on the C: drive on my laptop (too much music).
When I installed Itunes, I specified f:\musicfiles for my music directory. After installation and setup, it didn’t create ANYTHING in that folder. So I copied the .itl and .xml files into that folder, did the search/replace for the directory to change it to the new f:\musicfiles location.
Isn’t that what I should be doing? The weird thing is that even after “corrupting” my .itl file, and confirming that itunes is definitely pointing to f:\musicfiles, it doesn’t seem to want to attempt to read the .itl file or the library at all.
Thanks for your assistance. I haven’t even begun to worry about the deauthorization of all the music I’ve bought on itunes since my original machine died, dammit.
#6 by Jilles at April 27th, 2006
The crucial step is letting iTunes create an empty library by starting it just once after the installation. After that you copy your own files to the directory that it created (there should be a new itl and xml file there already, which you replace by your own versions) and corrupt the itl. That tricks iTunes into believing that library is part of the whole setup and that it needs to be fixed.
This worked fine for me. Though as mentioned above, the paths need to be correct in the xml file or it won’t find your files (that happened to me on the first attempt). The path file://localhost/Users/{User}/music/iTunes/ iTunes%20Music/ you pasted above does not seem to point to your F drive ….
#7 by klessa at April 28th, 2006
HALLELUIA! It worked. Okay, here’s the deal… even though I want my music files to be on the F drive, the library and XML still had to be on the C drive. I didn’t realize that — I think you stated that but it just didn’t get through to me.
So in other words:
- within the .xml file, I needed to replace with the F path
- within iTUnes setup, I specified the F path
- F Drive and path contain NOTHING but the various music files
- I modified the .xml and .itl files contained on the C drive, in the iTunes standard place.
Before, I was modifying the .itl and .xml on the F drive, thinking that’s where I pointed iTunes, that’s where it should go. WRONG!
It’s now working JUST FINE. I have my playlists, my preferences, my ratings.
Thanks so much for providing the extensive walk-through on this. Let me know if you ever need any database or programming assistance and I’ll be happy to oblige!
#8 by nathanwind at June 10th, 2006
I seriously had to just create an account and login to post a comment to THANK YOU for this post. It just saved my @ss trying to set my itunes up on my new laptop (with my music on my external harddrive). I labored over this for awhile until I found you post and BAM, it was fixed in a few seconds. Thanks man, call it one guy doing another guy a solid.
#9 by Jilles at June 10th, 2006
No problem, enjoy your music
#10 by jysan2001 at June 26th, 2006
I, too, registered for an account just to thank you for this entry. I was SO worried that I would lose my playcounts and playlists after switching to a new computer, nevermind waiting for my iPod to rewrite 8GB of music.
Personally, I found that using a local area network to transfer the files to the new computer was much faster than an external hard drive. Even using a basic messaging client allowed me to transfer at 20MB/s, much faster than copying files to an external hard drive (though, I must note, my old machine still has USB1.1, so that would have taken forever).
Also, I found it easier to create an identical folder filepath on the new machine. This way, I didn’t even have to search/replace the filepaths in the .xml file (for more than 2000 songs) and therefore avoided any files from being lost. Granted, I was moving to a hard drive that was identically labelled as on the old PC.
Anyhow, thanks for your tutorial. It made me feel less stupid than Apple’s “Plug in your iPod” tutorial.
#11 by LisaSoniaT at July 29th, 2006
Thanks so much for this. It all worked fine except when I came to burn a CD from iTunes - I’m told that ‘disc recording not found..’
Is this related to having moved iTunes or is it a separate issue?
#12 by Jilles at July 30th, 2006
Hi Lisa, I’m not sure what that error could mean except that maybe the path information for some songs is not correct. I’ve burned cds from my moved itunes library without errors.
#13 by rmccoy at August 9th, 2006
Thanks for a great writeup.
Has anyone tried this and managed to keep their podcast subscriptions? My previously received podcasts came over, but not the subscriptions.
#14 by watermelonbob at August 17th, 2006
Thanks so much for this entry! Transferring from my Thinkpad to my Macbook worked like a charm.
To rmccoy, same thing happened to me. Podcasts went over fine (play count and everything) but I had to resubscribe. No biggie though, just had to click the “subscribe” button again.
#15 by Bamm at September 21st, 2006
I tried all directions.
Fresh computer. it gives the error that itl is damaged but that is it. When itunes opens no music in library.
Copied all of it to local hard drive. I have tried it 3 times.
step by step. All 27 gb of music is under %iTunes\iTunes Music\ then all mp3’s are under F00 F01 F02 and so on…
#16 by engvoip at November 3rd, 2006
This is far more complex, what was describe above.
The easiest way of moving files is as follows:
http://docs.info.apple.com/article.html?artnum=301...
#17 by engvoip at November 3rd, 2006
link correction:
the new link is:
http://docs.info.apple.com/article.html?artnum=301748
#18 by Jilles at November 3rd, 2006
Hi engvoip,
The whole point of my explanation above is that not everybody chooses to have their music organized automatically by itunes. Additionally, we’re talking about moving your music to an entirely new machine that might not even be accessible from the old machine directly. Apple does not offer any guidelines on how to do it and even seems to include features in itunes to make this hard for normal users. The explanation on their site only works for moving files around on the same machine.
And Bamm,
Sorry to hear it didn’t work for you. Are you sure you edited the paths correctly? %iTunes does not sound right to me.
#19 by diane at December 17th, 2006
Ahhh foolish me went for help AFTER I already made my careless mistake. I got a new hardrive so I went zipping through moving my files. And I CUT and pasted my whole Itunes folder.. So that means no backups at all. Would it still be possible in any way for these instructions to work for me? Thanks!
#20 by Jilles at December 17th, 2006
As long as you have the old xml files and your music folder, it should work. Otherwise you just have to import the music that you cut & pasted.
#21 by soraya at December 17th, 2006
I’ve always stopped when someone/place asks to me create an account to post a comment (”nah, no worthy”) but I couldn’t say the same thing this time _BECAUSE_ I want to tell you: THANK YOU VERY MUCH for your post. A year ago, I tried the steps that Apple suggests to accomplish the same task and it only created frustation; so I decided to keep my old (very) slow computer just to run iTunes. (what a pain!)
I followed the steps as you describe and it worked smoothly. Again, THANKS for sharing your experience. Great job!
- Sory
#22 by Jilles at December 17th, 2006
Hi Soraya,
I’d rather not have accounts but unfortunately that means deleting spam comments all the time.
But good things worked for you.
#23 by Mtxo at February 22nd, 2007
Well that worked AWESOME! Thank you so much! Now I just need some spackle to fix the wall I’ve been beating my head against!
2 notes. Wordpad in Windows works well to find and replace the path. Also, renaming the itl file doesn’t work. Once I followed your instructions exactly, surprise, worked as advertised. That’s the old IT guy in me - speed reading and knowing a “better way”.
Thanks again.
#24 by Mauxe at April 6th, 2007
Very useful information
Will this method work as well if you have iTunes organize your music? I read the link posted above for moving to a new hard drive on your system but I will be moving to a new system and I am hoping that it won’t be too painful…
#25 by Jilles at April 6th, 2007
Hi Mauxe,
Should be no problem. The best way to find out is to try. Of course, make a backup before you do anything.
Jilles
#26 by henryvi71 at July 9th, 2007
I just registered to say thank you. The procedure you describe work flawlessly or me.
#27 by Lisa at February 24th, 2008
Oh wow, thank you so incredibly much! I was a little skeptical about having to corrupt the itl file (Seriously, Apple, is this REALLY what it’s come to?), but hey, it worked, and I cannot thank you enough!! THANK YOU!!!
#28 by Harris at March 5th, 2008
This works so beautifully!! It took me about an hour to go through this process for my 30 GB of files but was so worth it! I keep all my songs rated in iTunes and once lost them all, so I’m really happy not to loose the ratings again. Thanks very much for posting this information.
#29 by Baird at March 18th, 2008
Many thanks. Worked like a charm. I am so very glad that I found this post. (And pretty cool that it is still providing assistance two years after being posted…)
#30 by Jilles at March 18th, 2008
Thanks Baird. Quite nice to see that this post still gets many hits per day. But, I’d really prefer Apple to get off their ass and fix this properly.
#31 by Tim at July 12th, 2008
Fantastic. I was banging my head in annoyance until I found your post, which means I have kept my itunes library!
#32 by Marshall at October 28th, 2008
Thanks for the quick fix!
#33 by rsladerer at March 13th, 2009
This worked like an f’ing champ!!!! Thanks so much - my wife would have been PISSED if I’d lost her “workout playlist” building her new PC.
#34 by joao costa at April 5th, 2009
thanks a lot!!! did work as you say, suggestion use CONTEXT as an editor