Tag Archives: itunes

Move iTunes Directories

This is probably not too helpful, since macOS Catalina has broken iTunes into an app for every media type, so the details of this post are mostly outdated if you've updated to Catalina. But I still have pre-Catalina (Mojave) on my MacBook Pro, and recently I searched and searched for an easy way to move my iTunes directory and couldn't find it.

To clarify what I mean when I say "move my iTunes directory": I don't allow iTunes to "Organize" my iTunes library. I choose where the files are located and how they are named and organized. There are lots of articles (including official Apple documentation) that explain how to move the iTunes-managed library directory. But none of those tutorials explain how to move your files from one directory to another when you're managing that location yourself.

This is a three-step process.

Step 1: Copy the files

The easy way to copy the files is using the macOS Finder, but if you have thousands of files this could be slow, as Finder seems to do a bunch of calculation up front so it can do fancy stuff like show progress bars. I'd prefer to do this quickly, so I wrote this bash script to safely copy my Music directory, subdirectory by subdirectory.

Script output

Step 2: Update iTunes track locations

This is the more challenging part, because your iTunes library is stored in a database file that isn't editable with external tools. A common work-around that is recommended is to export your iTunes library as XML and edit the XML, then re-import that edited XML as your new library. I've done that before, and found that it's very error-prone and leaves a lot of manual cleanup remaining.

So, I wrote an AppleScript to go through every track in your iTunes library and change its location from the old directory to the new directory.

On my iTunes library of about 10,000 tracks, it took quite a while to churn through everything: I didn't time it, but it felt like about 30 minutes. Maybe it was less.

Step 3: Remove the old files

After you're sure everything has been copied correctly and your iTunes library is correctly updated, you can remove the old copy of your files.

Nick's Zappa Playlist

I twittered about an amazing playlist (or iMix, if you will) of Frank Zappa tunes that Nick Bradbury published, but it appears that iTunes has deleted the iMix because Zappa is no longer on iTunes. But it's an amazing playlist, so here it is:

  1. Peaches In Regalia, Hot Rats (1969)
  2. Camarillo Brillo, Over-Nite Sensation (1973)
  3. My Guitar Wants To Kill Your Mama, Weasels Ripped My Flesh (1970)
  4. Maggio, The Man From Utopia (1983)
  5. St. Alfonzo's Pancake Breakfast, Apostrophe' (1974)
  6. Echidna's Arf (Of You), Roxy And Elsewhere (1974)
  7. Mother People, We're Only In It For The Money (1968)
  8. Cocaine Decisions, The Man From Utopia (1983)
  9. Five-Five-Five, Shut Up N' Play Yer Guitar (Disc 1) (1981)
  10. Can't Afford No Shoes, One Size Fits All (1975)
  11. G - Spot Tornado, Jazz From Hell (1986)
  12. Dumb All Over, You Are What You Is (1981)
  13. Teen-Age Prostitute, Ship Arriving Too Late To Save A Drowning Witch (1982)
  14. Sleep Dirt, Sleep Dirt (1979)
  15. Tell Me You Love Me, Chunga's Revenge (1970)
  16. Pygmy Twylyte, Roxy And Elsewhere (1974)
  17. Baby Snakes, Baby Snakes (1983)
  18. Electric Aunt Jemima, Uncle Meat (1969)
  19. Po-Jama People, One Size Fits All (1975)