Hi Jesper, If you simply want iTunes to find your music again, and are not worried about trying to recover playlists, then you can just use "Add to Library…" (Command-O) and point to your current iTunes Music folder (e.g., ~/Music/iTunes) as the folder to be added.
iTunes stores the database information for your Music library in two files under your user account. On a Mac these are: ~/Music/iTunes/iTunes Library ~/Music/iTunes/iTunes Music Library.xml The first file is a binary format file that iTunes works with. The second (.xml) file is a version of the first file that third-party software programs can work with, that contains much (but not all) of the same information. When you first open iTunes, it will look for these files. If they are not present, then iTunes will create these files (which will have no entries). If you have a copy of the "iTunes Music Library.xml" file from a backup, you can force iTunes to rebuild its "iTunes Library" file with the contents of the "iTunes Music Library.xml" file by opening the newly created "iTunes Library" file in an editor like TextEdit, deleting everything, and then saving the file. Note that it does not work to delete the file, since iTunes will just create a new version of this file, reflecting a blank library, the next time you open iTunes. If you then replace the existing .xml file (i.e., "iTunes Music Library.xml") with your backup version (by deleting the newly created "iTunes Library.xml" file and copying your backup version to this directory), then the next time you open iTunes it will rebuild the "iTunes Library" file using the contents of your "iTunes Library.xml" file. What this means is that all the information about your playcounts, ratings, playlists, etc. will be reconstructed. The only thing that will different is that the information about the date the tracks were added to your library will be lost -- they will all show up as being added at the time you forced iTunes to rebuild its database. This method only works well if the music tracks are in the same location as they were when you made the backup of your "iTunes Music Library.xml" file -- which does not appear to be the case here, since you've moved your tracks from the the external drive to Macintosh HD. However, if you really want your music tracks to be stored on your external drive, the tracks are still there, and you have an old copy of your "iTunes Music Library.xml", perhaps from a Time Machine backup, then you can use the method I outlined above to restore your library. Otherwise, it might be easiest to just use "Add to Library" (Command-O) and type or paste: ~/Music/iTunes/iTunes Music into the dialog window prompt (assuming that is where you've copied your music). Then iTunes will simply recreate the library data base when it adds your music. You will lose the information on playlists and also playcounts and ratings, I think, but the other information will all be there. It's possible to edit the backup "iTunes Music Library.xml" and use "Find and Replace" to change the file paths of all your music from the external to your current music location, but that can be rather tedious. (Maybe somebody should write a script or automator workflow for this problem; it should be possible to shell script this easily enough.) In any case, one of these solutions should work for you. The easiest thing might be just to add all your current tracks on the Macintosh HD to your iTunes Library. Make sure that these tracks are somewhere in your folder ~/Music/iTunes/iTunes Music folder before you "Add to Library" with Command-O. It doesn't even matter if the tracks are not organized by structure of Artist and Album -- iTunes will reorganize this correctly from your tag information when it adds the tracks and move the files to the proper location within this directory. The main point is that if you are adding your tracks from some other location, iTunes will copy versions to the "iTunes Music" folder when it adds the tracks, thus doubling the amount of space that is occupied. This assumes that you have the default iTunes preference settings for the advanced pane of iTunes preferences with the boxes checked for "Keep iTunes Music folder organized" and "Copy files to iTunes Music folder when adding to Library". You can check your settings by opening the preferences menu with Command-comma, and navigating to the "Advanced" pane, then reading the settings. HTH. I can't test this in Snow Leopard, but this is how iTunes works in all previous versions so I assume this is accurate. Cheers, Esther On Sep 11, 2009, Jesper Holten wrote: > > Hi there. > Now the snowleopard is finally installed and I am almost happy if it > were > not because itunes will not find my music collection witch I have > copied > back. iis the whole library structure under itunes that has been > copied from > the external drive back onto mac hd. But something is afoot here, > and I fear > I have messed up the whole of itunes? > Please help me! > Tbest regards, Jesper. > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/macvisionaries?hl=en -~----------~----~----~----~------~----~------~--~---
