In iTunes, on your first machine, you will have to go to File|Library|Export Library
.
This will generate your Library.xml
file.
If you take a look in it, you will see for each file all the fields you will find in iTunes (location on HDD, play count, rating, etc...).
Now, on your new machine, after having installed iTunes, you have to go to File|Library|Import Playlists
(not obvious at first as I was looking at an Import Library
menu but it doesn't exist) and select the xml file you exported on your first machine.
If you try, as I did first, to edit the xml file and overwrite the newly created one, when launching iTunes, it will delete it and create again an empty new one. You have to go through this Export/Import process (which is quite quick).
PS: you may have to edit the xml file anyway before importing, if the paths to the music files changed from your initial machine. For example, I upgraded from WinXP to Win7. As the user folder path changed, I then had to edit the paths c:\users and documents\myuser\My Documents\My music
to c:\users\myuser\Music
, or something like that, I don't remember exactly.
PPS: Always keep your exported xml file untouched somewhere until you have everything OK on your new machine...
The easiest way is to create a folder, say on the Desktop, then open that folder. In iTunes, create a playlist, and add all the music you want there. Select all these items, then drag them to the window you opened for the folder on the Desktop; the Finder will copy the music files. Next, quit iTunes, launch it and choose the second library, and add the files by dragging them onto the iTunes window. You can then go back and delete the files in the original library, if you want.
Best Answer
You can easily create a second iTunes library when you launch iTunes by holding Option (on a Mac) or Shift (on Windows). This allows you to specify a file name and location for the new library which you can populate with whatever media you like. When you want to switch back to your regular library, just hold down the appropriate key again when relaunching iTunes and select the original library file.