How To: Batch Copy Music From iTunes to Another Directory

I found myself having to figure out how to do this the other day, so i decided to tackle the problem.  I also didn’t want to install any extra software (I am sure there are some apps that will do this for you).  The solution is not very difficult, but it does require perl to be installed (yes i know, i said didn’t want to install anything extra, but perl was already installed).  The benefit of a perl solution is that it will be easy to convert the perl script to a cgi script that can be used on a web page (i.e. you just go to a web page of mine and it does the magic for you).

The steps to make this happen are the following:

  1. Make a new playlist in iTunes (call it whatever you want)
  2. Add all the songs you want to batch copy to this new playlist (this can be very fast as you can use the built in filtering in iTunes to batch add files to the playlist)
  3. Export the playlist to your computer (just put it on the desktop or something)
  4. then run the script: perl convert.pl myPlaylist.txt ucs-2le > myPlaylist.bat

So obviously, you will need to run this in a console window, and you will  need to have both the convert.pl and the myPlaylist.txt (or whatever you name it) in the current directory.  I recommend making a new folder (copied-mp3 or something like that) and then dump those two files into it, then navigate to it in the console.  The ucs-2le is the character encoding format, this is the value you would use for windows iTunes.  I am not sure what to use for Mac, it depends on what mac iTunes exports playlists to.  You can always convert the playlist txt file to ASCII encoding and then use ascii instead.

The command will build a batch file (myPlaylist.bat in the example above) as it runs.  It shouldn’t take long to run, like a couple of seconds unless you have billions of mp3’s in the playlist.  All you have to do is run the batch file (double click or through the console window) and all of your songs in the playlist will be automagically copied to the current directory (wherever you are running the batch file from).

Grab the script HERE (convert.pl) – Make sure you save this as convert.pl and not as convertpl.txt

If there is interest in this script, i will definitely make a web site for it.  Otherwise I will just leave it here for people to use at their own leisure.  If YOU feel like turning this script into a web site, feel free, but please let me know before you do so I can clean up the script a little first (and please link to this site).

Back Again: Stocks, Homes, and Code

I have decided that I will be bringing this blog back to life, after a very long hiatus.  I don’t plan to do much music mixing however, instead I want to turn this blog into a informational knowledge-base on the things that interest me.  For the near future that will likely include the Stock Market, Real Estate, and Coding.

For the past year, I have become increasingly interested in the stock market.  Mostly with learning how to analyze the various aspects of the market and how to build a successful portfolio.  As the days progress I will post updates on my findings and opinions, and track the progress of my decisions.

I am also nearing the date that I purchase my first house. Due to the market conditions the way they are in Edmonton, I am fortunate enough to be prepared to make this jump into the real estate world.  Along the way I have been researching strategies for finding, buying, and converting (into wealth).  The most notable topic would be that of the Smith Manoeuvre, something which I will likely discuss in great detail over the coming months.

Finally, my coding roots have not departed, I still code as a hobbyist.  My current project is the rrssdl project (look at the page on this blog, to the left).  I am still interested in making this project into something really useful for the community, the latest news on rrssdl is the addition of the log4r framework.  Though it is currently in a broken state, soon the log4r framework will be ready for action and then I can get onto fixing bugs.

rrssdl – A Ruby TV Show RSS Downloader

Brand new creation, take a look at the page i’ve created HERE

« Previous PageNext Page »