I have been researching the movement and de-duping of iTunes Libraries for a client as they have two separate libraries on two machines in different houses. They first wanted them consolidated and then de-duped with the ultimate aim of choosing one as a master and then synchronising them over the internet thereafter.
I spent hours spinning my wheels about the best way to consolidate them without loosing ratings etc and finally I found this marvellously clear piece by Chris Breen.
If you then layer into the mix the excellent Dupin from Doug over at dougscripts.com then you have a pretty neat solution.
Hurrah! Job done.