Jkwnd

Q: How do I change the drive iTunes plays music from?

I cloned my hard drive to an SSD earlier, so I have 2 identical copies of my music library on drive C:/ (my new SSD) and drive E:/ (my old hard drive). I want to delete all my music from my SSD and have iTunes play it entirely from the hard drive, how can I achieve this?

 

I have tried deleting the iTunes folder from the C drive (C:\Users\X\Music) and forcing iTunes to load the library on drive E (by shift opening and choosing new library) but it still goes back to playing media files located on C. I have spent a huge amount of time manually organising my library, so sadly it's not as simple as moving the iTunes Media folder since none of my music is located there. I have also tried this but it still ends up playing files on the C drive:

How to move your iTunes library to a new computer - Apple Support

 

 

Simply, all I want to do is change iTunes somehow so it plays from E:/My Music and not C:/My Music. All the file paths are identical, it's just the drive letter I want to change.

 

Thanks for any help.

Posted on Dec 9, 2015 2:43 AM

Close

Q: How do I change the drive iTunes plays music from?

  • All replies
  • Helpful answers

  • by turingtest2,

    turingtest2 turingtest2 Dec 9, 2015 2:56 AM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 9, 2015 2:56 AM in response to Jkwnd

    See Make a split library portable. It sounds like you are almost there. If your media isn't inside the standard media folder but up in E:\Users\<User>\Music that will be why it hasn't worked. Are you really wedded to your manual organization? Would it be acceptable to have your media at E:\iTunes\iTunes Media\<any subfolders that you choose>?

     

    tt2

  • by Jkwnd,

    Jkwnd Jkwnd Dec 9, 2015 3:53 AM in response to turingtest2
    Level 1 (0 points)
    Dec 9, 2015 3:53 AM in response to turingtest2

    Thank you for the fast reply, that sounds like it could potentially work. Just to ask, since both drives are internal and I don't intend to remove / change them any time soon, is there a need to make the library "portable"? I'm slightly put off by the fact you say it makes the library harder to move in future, should I ever need to. However I gather you can't install iTunes on any drive other than the boot volume so I don't know what else I could do. My SSD is 1tb but I'd rather not keep 200gb of music on it if I can avoid it.

     

    I am pretty invested in the manual organisation of my library at this point, especially with the size of my library I like the control I have over it.

  • by turingtest2,

    turingtest2 turingtest2 Dec 9, 2015 6:19 AM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 9, 2015 6:19 AM in response to Jkwnd

    Keeping the media inside the main iTunes Media folder, which is in turn inside the iTunes library folder that contains the iTunes Library.itl database is what keeps the library portable. It is having the media stored outside of the media folder or having the media folder not stored in the library folder that causes problems when you want to move the library, such as those you've already seen.

     

    The easiest path from where you are now, or at least where you were before you copied anything, would be to have the library in a working state with the media on drive C: where it was before, declare E:\iTunes\iTunes Media as the media folder, consolidate the library, then move the active library files into E:\iTunes and access them there.

     

    If you want to keep the current structure there are ways set out in the user tip to move the library files into the correct relationship to whatever is currently the de facto media folder, probably C:\Users\<User>\Music. The library files would need to go to C:\Users\<User> and be accessed there before being copied into E:\Users\<User> and accessed there. More steps could be used to normalize the library into the \iTunes\iTunes Media\<Subfolders> layout, keeping your own pattern of subfolders.

     

    A last alternative would be to write a script that systematically edits the path in just the way that you want, replacing C:\ with E:\. I don't have one that works exactly like that, mainly because it is more usual for people to break the library completely before asking for help and iTunes won't supply the expected path of a file that is missing, but I can adapt one of those posted at http://samsoft.org.uk/iTunes/scripts.asp for the task, or I can potentially work out how to read the expected path from the XML file.

     

    tt2

  • by Jkwnd,

    Jkwnd Jkwnd Dec 9, 2015 1:29 PM in response to turingtest2
    Level 1 (0 points)
    Dec 9, 2015 1:29 PM in response to turingtest2

    Thanks for the explanation. I did actually try to open iTunes Music Library.xml in Wordpad, and then to Find and Replace all C:\My Music\ with E:\My Music but it just crashed Wordpad. Perhaps it would have worked if I left it longer, but I have no idea. My library is almost 15000 songs, does the XML document contain file paths on every one? If it does, could you see that working, or would it simply break the library somehow?

     

    If I consolidate media, does that create an exact copy of the current folder structure I have now but placed in the iTunes Media folder? Or does it create copies, but sorted by Artist, Genre etc?

     

    I am not familiar with scripts for iTunes, or with the amount of work involved, but maybe that could work. I really do appreciate your trying to help.

  • by turingtest2,

    turingtest2 turingtest2 Dec 9, 2015 1:55 PM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 9, 2015 1:55 PM in response to Jkwnd

    Editing the XML doesn't change anything in the ITL which is the core of the library. You'd have to make a copy of the XML, edit and import it, which would then double up all of your tracks, or trash the library and then import the XML, however this loses your original date added information and there might be other side effects I don't know about. I'm also not certain Wordpad is a safe editor for the XML.

     

    Consolidating files makes new copies in the standard iTunes layout, first by media kind, e.g. Music, Movies, Podcasts, and then for music Artist and then Album subfolders. All metadata is preserved, it is only the physical layout that gets adjusted.

     

    I've been looking and I actually hacked up one of my scripts for a similar path edit task at one point. Give me a couple of hours to polish up the hack and test it, then I'll post instructions.

     

    Can you confirm all of the media is still available at both paths and all you want to do is change C:\ to E:\ for each entry in the library?

     

    tt2

  • by Jkwnd,

    Jkwnd Jkwnd Dec 9, 2015 3:26 PM in response to turingtest2
    Level 1 (0 points)
    Dec 9, 2015 3:26 PM in response to turingtest2

    I was messing around with drive paths and my second drive now resides on B:\. Apart from that, everything is identical and the media is available at both paths. I would now just be looking to change C:\ to B:\ .

  • by turingtest2,

    turingtest2 turingtest2 Dec 9, 2015 3:46 PM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 9, 2015 3:46 PM in response to Jkwnd

    Thanks. Annoyingly my website is down right now so I might not be able to upload the script until tomorrow.

     

    tt2

  • by turingtest2,Solvedanswer

    turingtest2 turingtest2 Dec 9, 2015 7:12 PM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 9, 2015 7:12 PM in response to Jkwnd

    Right, just uploaded a new version of ConsolidateByMoving which you'll need to give one minor tweak to before you run it. Change the initialisation value of ThisThat from False to True on what is currently line 142. The variables This and That are set up for you. Save the edited script. Select the tracks of a test album and run the script. Say no to the prompt so you can check it is doing something sensible. Check the paths in Get Info afterwards to be sure. When you are happy it does what you need select all Music and let it run automatically. As always I recommend a full backup of the library before you start.

     

    tt2

  • by Jkwnd,

    Jkwnd Jkwnd Dec 10, 2015 11:42 AM in response to turingtest2
    Level 1 (0 points)
    Dec 10, 2015 11:42 AM in response to turingtest2

    Sorry for the delayed reply, but I just tested it on one album and it worked perfectly! I really can't thank you enough, without doubt the most helpful person I've ever encountered on any forum.

     

    I can't help but think it should be easier than this, but I guess that's partly my fault for being so fussy with how I control my library. I am hugely grateful.

  • by Jkwnd,

    Jkwnd Jkwnd Dec 10, 2015 12:04 PM in response to Jkwnd
    Level 1 (0 points)
    Dec 10, 2015 12:04 PM in response to Jkwnd

    Just a final report, it took 17 minutes and fixed 14,666 files, with 4 missing. Everything appears to play just fine, no idea about the 4 files but I am not concerned about them. Amazing result, my SSD is now 200gb lighter! I am so happy!

  • by turingtest2,

    turingtest2 turingtest2 Dec 10, 2015 12:09 PM in response to Jkwnd
    Level 10 (87,434 points)
    Apple TV
    Dec 10, 2015 12:09 PM in response to Jkwnd

    You're welcome.

     

    As given in Make a split library portable if you manipulate the library into a portable shape the whole thing becomes much easier. This is possible even while maintaining your own folder layout as long as you are prepared to organize your media somewhere inside X:\iTunes\iTunes Media where X: is a drive of your choice. I do just this, mainly using a similar scheme to iTunes, but with separate folders for Classical, Comedy, Soundtracks, and Various Artists, and a number of other personal naming conventions such as longer file and folder names, different character substitutions, converting leading any "The " into a trailing ", The", etc.

     

    tt2