Wednesday, March 27, 2013

Easy way to move iTunes library location...make it Virtual!

So, iTunes is a pain in the butt sometimes.  It really doesn't like your library being on a network share as it gets very sluggish and breaks the software if you change the "location" that the Music folder points to.


I happen to have a decently large iTunes library at ~150GB in size (lots of audiobooks and movies, etc).  This can be cumbersome to move around and manage and it also will not comfortably fit on my shiny new 256GB SSD in my desktop.  I also happen to have a 1TB drive in my desktop for just such an occasion.

I've found the best way to manage this is using symbolic links (symlink).  A good guide on creating symlinks is here. A symlink is very useful because it acts like a pointer on disk to another folder.  Obviously everyone is familiar with a Windows Shortcut...which is a hokey/fake pointer...its a file with an address to another file that you have to click on, etc.  It's like some guying telling you he knows a guy and here's his home address on a napkin.

A symlink, on the other hand, is a true legit pointer that even "tricks" the operating system into working correctly.  Its like a magic door that if you step thru it you're magically in another place...like the wardrobe of "Lion, Witch and the Wardrobe" fame.

So if you make the "Music" folder in your profile, which iTunes (and most other things) use by default, a symlink, no apps, or even the OS, really knows that the files are somewhere else. (Obviously the OS would know if you ask it specifically, but otherwise it plays along with you like a good friend should).
  1. Close iTunes.
  2. Move the iTunes directory to where you want it to finally live.  In my case it was D:\Cloudstation\Music.
  3. Delete the default Music folder (usually located at C:\Users\<username>\Music.
  4. Open a command line with administrative privileges.
  5. Change to your user directory (C:\Users\<username>)
  6. Use this command  "symlink /D Music D:\CloudStation\Music".
  7. Voila, now your My Music pointer in your profile points to the D: drive.
If you now open iTunes, it should open up none the wiser that it is now running from another physical location because the path that it uses (C:\Users\<username>\Music\iTunes) is still valid (symlink!).

This still works if you wanted to move iTunes again to another location.  Just delete and recreate the symlink after moving the files!

Enjoy.