When I’m not listening to podcasts in the car, I, of course, like to listen to music. Terrestrial radio, though, is lame and I’m too cheap for satellite; so, the music I listen to is either songs I’ve downloaded to my phone or songs I’ve downloaded to a USB drive that I can plug into my console.

I’ve collected a few CDs over the years and have managed to digitize about every one of them. At last count, my digitized music catalog consists of over 8700 songs across 600+ albums. My catalog is just under 50 Gb…which means, it can fit on a single flash drive…which means I should be able to take my entire catalog with me on important trips like clearance day at the Frugal Hoosier!

Unfortunately, my car stereo seems to have some limitations and when I pack 8000 or so songs on a drive, the stereo a) takes 5-10 minutes to even read the drive and b) never seems to read all the songs on the drive. So, I need to start being selective about what songs I take with me. I don’t want to have to click through 600+ folders, though, and drag-and-drop files one-at-a-time.  Who has the time for that? What if I copy over songs by genre, such as “Rock” or “Metal” or whatever? Or I could make a list of favorite bands or albums and copy over anything that matches that list.

Well, I can do all this through the wonder of PowerShell. Here’s a script I put together to inventory all the MP3s in my Music folder and collect various ID3 tag information on them including genre, artist, album, etc. Finally, it copies MP3 files that meet my conditions–like favorite genres or whatever–over to my flash drive.

Unfortunately, this script is pretty slow: I think largely because I have to instantiate the shell.application COM object to get the MP3s’ ID3 tag information.  Your mileage may vary. Initially, I tried several of the open source .NET ID3 libraries out there but could get none of them to work. At any rate, this thing works for me, so I thought it might be worth sharing. Now, get rockin’ down the highway!