Use Spotlight on Your iPod

July 24, 2007

Spotlight, by default doesn’t index iPods which is a bummer because the filenames are mangled. OK, no biggie we can just enable it and rebuild the index:

sudo mdutil -i on /Volumes/fliPod
sudo mdutil -E /Volumes/fliPod

Unfortunately that will not give you access to the audio files since Spotlight also ignores hidden files and folders. This is where mdimport comes in:

mdimport -f /Volumes/fliPod/iPod_Control

And now you can easily find your music from the iPod on any Mac. :)

mdfind "kMDItemAuthors == 'Nine Inch Nails'" -onlyin /Volumes/fliPod

Or, if I (still) had any Britney on my iPod, I could create the ultimate party playlist:

mdfind "kMDItemAuthors == 'Britney Spears'" -onlyin /Volumes/fliPod > britney.m3u

… playable, among others, with VLC.