iTunes: Editing XML file to change storage drive?

Discussion in 'Mac Apps and Mac App Store' started by VideoBeagle, Nov 30, 2014.

  1. VideoBeagle macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #1
    My set up:

    • itunes folder with xml files is on my Startup drive in the music folder, per default.
    • My Music files are stored on an external drive. iTunes is set to NOT copy or move the files and to not organized them on their own.

    The issue:
    • I'll be moving the music files to a new drive soon. The hierarchy on the new drive will be the same as the current one, but a new drive name.

    CAN I:
    Just edit the iTunes Library.xml with text wrangle to change the drive name from the current to the new one?

    I'd prefer to not have to re-set up the library if possible.
     
  2. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
  3. danny_w macrumors 601

    Joined:
    Mar 8, 2005
    Location:
    Austin, TX
    #3
    Why not just copy the folder to the new drive and point iTunes to the new drive in Preferences->Advanced? Seems simple enough to me. What am I missing here?
     
  4. T'hain Esh Kelch macrumors 601

    T'hain Esh Kelch

    Joined:
    Aug 5, 2001
    Location:
    Denmark
    #4
    You should rather keep your entire iTunes folder on the external drive. You are just making a mess keeping the library.xml separate from the files for no reason.

    Danny_w: He can't do that because he split it up for no reason.
     
  5. danny_w, Dec 8, 2014
    Last edited: Dec 8, 2014

    danny_w macrumors 601

    Joined:
    Mar 8, 2005
    Location:
    Austin, TX
    #5
    I used this feature and that is what it did. According to Apple's instructions you move only the media files to the external, and then use Preferences to point iTunes to that external media file folder. I wish that the xml file were also on the xternal but Apple apparently does not support that.

    http://support.apple.com/en-us/HT201562

    I agree that keeping them together makes more sense, and could make recovering from a crash of the external easier, but hos is this done exactly? Apple only supports the separated approach it seems. The method I mentioned using the Preferences->Advanced option creates them on separate drives.
     
  6. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #6
    I believe that iTunes handles the situation of a missing external drive more gracefully if that iTunes Library (not the media) is in the local Music folder.

    If you are careful to never start iTunes without your external drive mounted then it is a moot point.

    A.
     
  7. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #7
    This.

    I've tried the editing the XML file, but it resets based on the ITL file after. the ITL file is not editable.

    The question is, can you rebuild everything as was from the XML, using it to make a new ITL.
     
  8. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #8
    Have you tried the solution danny_w offers in post number 3? What were the results?

    I admit that nowadays I cheat - the new drive is always named the same as the old drive, and the old drive is renamed. :)

    A.
     
  9. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #9
    I looked at Danny's method..it currently points to music library files on the imac itself, so it won't work for changing the file locations.

    Yeah, I COULD just avoid the hassle and have the old name match the first, but the new drive will also have movie archives on it, So I wanted to change the name to reflect that.

    -----
    I've found http://mwholt.blogspot.com/2012/09/restoring-lost-or-moved-itunes-library.html & http://support.apple.com/en-us/HT201561 which supports my theory...the apple page has this caveat:
    "iTunes Library.xml contains some (but not all) of the same information stored in the iTunes Library file. "

    I'm trying to figure out that that Not All is...so far, it seems like that may be an artifact of older iTunes versions.
     
  10. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #10
    I am not sure I follow. Apple's solution appears (at least to my cursory examination) to allow you to change the location of the media, regardless of where it is now. To quote danny_w, "what am I missing"?

    A.
     
  11. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #11
    Dany's method changes where the iTunes Media Folder is.

    I'm not moving the iTunes Media Folder.

    I'm moving where the iTunes Library files (the xml and itl) point to.

    ---------
    Apple's solution is how I would implement my "Change the XML file" plan.
    I change the XML file to reflect the new path, delete the itl file, and import the changed XML as a playlist. (see the blog link I posted which says this idea works).

    The stopping point is as I said, THIS LINE in the apple KB

    "iTunes Library.xml contains some (but not all) of the same information stored in the iTunes Library file. "

    Which means I would be recreating the library file with some, but not all of the info there now.

    The question is now, WHAT, if anything, is the "not all" info I would be missing.
     
  12. danny_w macrumors 601

    Joined:
    Mar 8, 2005
    Location:
    Austin, TX
    #12
    Exactly. And it's not my method, it's Apple's method. You 1) copy the iTunes media folder to the external drive, 2) point iTunes to that new folder, and 3) delete the original media folder.
     
  13. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #13
    Right, or you change the pointer in Preferences, and you use Consolidate and let iTunes copy everything. I have not done it recently, my library has gotten "complicated" :) but it has never failed me in the past.

    A.
     
  14. danny_w macrumors 601

    Joined:
    Mar 8, 2005
    Location:
    Austin, TX
    #14
    And it is "supported" by Apple directly, not some workaround.
     
  15. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #15
    Ummnn.. Unless I am missing something really basic, I think you are. From 'old drive' to 'new drive'. You seem to want to accomplish this by editing files.

    A.
     
  16. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #16
    No. I really don't.

    This is an iTunes Media Folder (the highlighted in blue).
    [​IMG]

    What I want to change are were some files are located, which is info stored in the the two files in the red box.

    THIS is the Folder that has moved.
    [​IMG]

    iTunes plays my media. I do not want it organizing or consolidating or touching how I have files set up.
     
  17. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #17
    Owing to the nature of the way I read this forum, I cannot see files not posted on the forum. By the sound of things, what was not clear is that you want to change a subset of your iTunes library, i.e. the music, and not the rest. I am sorry, but I do not have a solution for that.

    A.
     
  18. T'hain Esh Kelch macrumors 601

    T'hain Esh Kelch

    Joined:
    Aug 5, 2001
    Location:
    Denmark
    #18
    It is certainly possible, and the preferences for it are clearly visible in the preferences. You can even create a new/change library by holding down alt when starting iTunes. This is clearly supported by Apple.

    More gracefully in that situation, but not really worth it IMO. If it fails, you simple select the correct library, and no harm is done.

    Otherwise you run into the problem that OP has, which is a mess.
     
  19. Alrescha, Dec 9, 2014
    Last edited: Dec 9, 2014

    Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #19
    While I agree that that it is a mess, I do not see that the location of the library files either helps or hinders. If that were the only problem, I believe they can be moved wherever you want and then pointed to with Option-click as you already mentioned.

    A.
     
  20. PinkyMacGodess macrumors 68040

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #20
    I've got the same setup, I think. I copied the folder to a new drive, took hours, and went in to Preferences and just pointed it to the new drive and folder. It read the path because that's were I pointed it to. Seamless and aside from the excruciating time copying the data, quick. AND you can name the folder whatever you want. Once iTunes is aimed at that folder, it is 'blessed' in the system.

    iTunes and its files are a mystery on some levels. I've edited the xml file a few times in the past. Once was to rename a track that for some reason refused to rename. That was rather early in iTunes history though. I think I also had to find a track and adjust its charms so that it listed in the right section.

    But the xml file isn't used for some of iTunes, even though there is data there making you assume it does. It was confusing, and I think the first time I had to do a rebuild because I got edit happy.

    I've had my iTunes database get flaky before so I treat it like I'd treat a crotchety old relative: You leave them alone until you need to deal with them, and then do as little as possible to them.

    I did find a website with a bunch of scripts for dealing with the iTunes database. Ginsu knife stuff. YMMV...
     

Share This Page