iTunes Plugins – Cleaning House

I like to keep my iTunes organized but as it’s grown, there’s just not time to do justice to the job.  That’s where iTunes Scripts come in.  Apple has made it possible to write scripts for windows that access things like playlists, albums, songs, song info, the iPod and more.  Using JavaScript, Perl, C#, etc. developers have written a number of incredibly helpful tools for cleaning up and organizing the iTunes library. 

Be careful though – some of these delete metadata or files without much warning.  Make sure you’re doing what you intend to do.

Teridon’s site has a nice library of tools available in an executable package.

Apple released a few sample scripts with the iTunesCOMWindowsSDK  package of developer header files. 

Moreover, the methods for developing custom scripts are very approachable in case these scripts don’t do quite what you need.

Moving and Organizing iTunes Music Files

I’ve been looking for this solution for awhile but only just stumbled across it.  Over the years I’ve built up a sizeable collection of music from CDs, family members, friends, free downloads, iTunes purchases, Amazon purchases, etc.  Unfortunately, I never restricted myself to a consistent convention for storing and keeping track of these different files.

What I need is a way to pull all of the physical files into one place from which I can organize and run backups on those files.  Accompanying those files, however, is a wealth of meta-information in the form of ratings, playlists, play counts and album information that I don’t want to lose.

Solution: iTunes now includes a “Consolidate Music” option under the “Advanced” tab.  Running this process will copy every file listed in your Music library to the home location (this setting: Edit -> Preferences -> Advanced tab).  In my case, I ran this process once, moving everything to an external hard drive, deleted the original copies of the music, and then running it a second time to copy everything back to a single folder on the local drive.

Update:  “Copying music failed. The file name was invalid or too long.”

  • This is a result of filenames being too long, generally a result of artist and album information included directly within the file name.
  • To get around this problem, open up the file My Documents/My Music/iTunes/Itunes Music Library.xml and search for the location of the directory you’re moving things from.  The first instance of this directory will be that associated with the file iTunes had trouble with.  Navigate to this file and shorten its name to something more appropriate.  Next, find the song in iTunes, double-click on it, choose “yes” and find the newly renamed file.  You can now resume the consolidation process, repeating these steps whenever iTunes has problems.
  • The process may sound daunting but my collection includes ~6000 songs and encountered only 6 such errors.