Apr 01, '08 10:30:03AM • Contributed by: vocaro
Luckily, I had exported the old iTunes library database using the File » Export command, so all of my ratings were preserved. The only trick was transferring the ratings from the export file into the new iTunes library. Doing so manually would have required many hours of tedious work, so instead I wrote an AppleScript to automate the process: The script takes as input the Music.txt file created with iTunes' File > Export command. It then applies the song ratings found in this file to the same songs in the current iTunes library. The song name, artist, and album must match; otherwise, the rating will not be affected. If they do match, the current rating will be replaced.
Note: Before running the script, the Music.txt file must be encoded as UTF-8. To do so, simply open the file in TextEdit (or a similar editor) and re-save the file with UTF-8 encoding. The script is also available from my site [136KB download].
