Transfer iTunes song ratings after re-ripping library: "I originally ripped my entire CD collection into iTunes at the 128 kbps quality setting, but recently I decided to re-rip it at 256 kbps. After completing the re-rip, a problem remained: All of the song ratings in my old iTunes library were now absent from the new one.
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: