Note: To all of you that have found this post while searching for a way to copy songs FROM a Shared iTunes Library, read this. If you want to copy TO another iTunes library, then continue.
In my search for a solution to this problem, I have found that many other people find themselves in similar situations. Here's a basic statement of the problem:
Add to that my additional needs that...
The best solution that I was able to find from searching the internet is this dude that has his laptop using an iTunes library on a shared network drive on his server. Then, when he leaves the home network, he has a script to switch to a local library. The worst thing about that setup is that it could be complicated to add songs from your network server to your local library before disconnecting.
My solution is to add new songs to my local library, and then when I tire of them or need to free up some disk space, I send them to my shared library on the server. This way, I always have my newest music on my laptop, but if I want to listen to some older songs while I'm at home, I can connect to the shared network library inside iTunes. The trick to my solution is how I send the songs to the shared library, hence the title of this post.
I have written an applescript that will...
You may download the script here: Copy Songs To Archive Server.scpt
If you put the script in your "~/Library/iTunes/Scripts" directory, it will be available from the menu bar when you are in iTunes.
Note that, for the ssh to work without prompting you for a password, you must set up ssh key pairs. There are plenty of pages around telling you how. This is not one of them.
This the Automator workflow that runs on the server. You have to export it from Automator to be an application.
You can download mine (AddFilesToITunes.workflow.zip) if you want, or you can just create your own from the above screenshot.
Obviously, you'll have to edit the applescript to point to the correct staging directory, server, and location of the AddFilesToITunes.app. Then you just select the songs you want to copy in iTunes on your laptop, choose "Copy Songs To Archive Server" from the script menu, and watch them appear in the shared library. You can then delete them from your laptop if you want, and still listen to them over the network. I wouldn't do more than 50 or 100 at a time, though. I've had "This script has stopped responding" timeout errors when I try more.
If you're too lazy or paranoid to sign up and leave a comment here, you can email me at erikwordpressplugins -at- gmail. Happy song archiving!