HOWTO: Move your iTunes music while preserving library data (when you don’t let iTunes manage your music library)
07-25-2007, 09:00 AM
Follow the link to the solution:
Copy of part of the text:
… 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
ocuments and SettingsUsernameMy DocumentsMy MusicNon-iTunes) to the new location (say, D:MusicNon-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. 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).
9. You’re almost done.
(EditPad Lite screenshot—click for larger size
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:
Go to Edit → Preferences → General and see that “Show Genre when browsing” is checked √). Press the “OK” button.
2. Choose Edit → Show 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.)
5. 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
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)
2. 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.