Any way to re-locate iTunes Library??

Discussion in 'Mac Apps and Mac App Store' started by peanutismint, Jul 15, 2011.

  1. peanutismint macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #1
    I've Googled this long and hard (TWSS) but am yet to find a solution that will allow me to perform this reasonably simple task without messing up my music library.

    I've recently moved to a new machine, and have copied my entire iTunes library to it but because the folder structure is now different (used to store my media on a separate partition, now stored in my Home folder), I'm left with a few unsatisfactory options:

    1. Continue using the old iTunes Library which has all my tracks and playlists preserved but doesn't know where any of the files are located.
    2. Delete and re-add all my tracks from the library, which means iTunes knows where they are but completely wipes all of my precariously chosen playlists.
    3. Do the 'move' and 'consolidate' method which will copy all of the tracks to a new location but will mess up my personal taste in folder structure/file naming as I believe you have to check 'allow iTunes to organise my music folders' (uh, no thanks iTunes, I had a massive MP3 collection long before you were even a glint in Steve Jobs' eye....)
    4. Start a new iTunes Library from scratch (??!)


    Am I missing something obvious? There's got to be an easy way to do this, right? All I want to do is change the very start of the file path in my iTunes library database so that instead of reading /MediaDrive/Music/iTunes etc it reads /Home/Music/iTunes. All of the other folder paths should be the same....

    Any way to do this??
     
  2. Cyacene macrumors member

    Joined:
    Oct 29, 2010
    #2
    Well, you can point iTunes to a new library by holding shift/option while opening it. Not sure if that will help your current situation but give it a go if you havent already. It will ask you for the location of your new library file.

    At the end of the day, I have to recommend door number 3. When I moved to iTunes I swore and struggled with how stupid it was and every time I moved a damn folder, it would give me the dreaded explanation mark. I cures iTunes and everything it stood for.

    Then one day I gave up and clicked the consolidate library button and checked off "let iTunes manage my library". It took some getting used to (i was like you and organized my folders my self), but in the end, if you let iTunes do its thing for you its WAY easier and much nicer when you have to change computers or backup your library.

    I am currently going through the same thing with iPhoto. Coming from picasa, I just cant understand why apple cant monitor my folders, and when something changes, it will update (as picasa does). But it seems that once again, if I just let iPhoto do the work and stop messing with my folders, my life is easier. It seems that Apple really want you to forget about the file system in general, which might be a good way to go.
     
  3. peanutismint thread starter macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #3
    Yeah I know about that; that's how I pointed my new iTunes installation at my old library which I've copied to a new drive, but the problem is that when it then loads that old library, it doesn't find any of the files as they're in a slightly different location.

    I know what you mean; at this point and after struggling with Apple's stubborn 'my way or the highway' apps for years, I am beginning to lose the will to fight programs like iTunes and iPhoto - it won't be long before I just bend over and take it like a good girl.... :mad:


    Isn't there any other better way? I wouldn't mind doing 'option 2' and re-adding all of my files if only iTunes would then realise that it then knew to where all my painstakingly crafted playlists' files were located.....???
     
  4. LizKat macrumors 68040

    LizKat

    Joined:
    Aug 5, 2004
    Location:
    Catskill Mountains
    #4
    Am i missing something here? I usually just go in iTunes, preferences, Advanced, top of that panel, uncheck those two boxes and fill in where the thing is.
     
  5. peanutismint thread starter macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #5
    I may well be missing an obvious thing; I don't remember ever having this problem before, but when I directed it at my current library the current library couldn't locate the files because they're now on a different drive.... I also tried locating one missing file manually because then it says 'iTunes can now attempt to fix the rest of your broken links from the one you just changed manually' but it failed to fix anything... That would have been a great feature if it just magically realised that all the files were still there under the same folder structure, just now the structure starts with /NEWDRIVE/Music etc instead of /OLDDRIVE/Music etc......!!!
     
  6. LizKat macrumors 68040

    LizKat

    Joined:
    Aug 5, 2004
    Location:
    Catskill Mountains
    #6
    Oh I see, it's the library itself that you've moved. I apologize. What I said works for moving the media files location...

    Maybe try one of those Doug's Scripts for iTunes, I haven't prowled for one in a long time.. . dougscripts.com/
     
  7. peanutismint thread starter macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #7
    UPDATE:

    The method described on this site MAY work.... Basically, it seems iTunes uses an encrypted (or not text-editable, anyway...) '.itl' file to store all your library information, but it also stores the information as an .XML file. It looks to the .itl before it looks to the XML, but by intentionally corrupting your iTunes Music.itl file so that it has to look to the XML and then editing the XML with a simple Find/Replace in text edit replacing your old file structure with a new one, it will re-build the library.

    The method's not foolproof; you still have to re-add your podcasts, and you may also lose your chosen column layouts; it also reverts all of your 'track added to itunes' dates to the same date (the date/time of the library re-build) but it's hands down the best solution I've found so far.....

    Will let you know if it's successful - if so somebody should totally make this into a script/app! :)
     
  8. costabunny macrumors 68020

    costabunny

    Joined:
    May 15, 2008
    Location:
    Weymouth, UK
    #8
    did mine the other day.. similar situation so here is my method (no guarantee).

    You need to feel ok in Terminal to do it this was and this is considered a dirty hack rather than an elegant solution (I am just lazy) :)

    if your old root was /MediaDrive/Music/iTunes/ and now its in /Users/username/Music/iTunes :

    open Terminal
    Code:
    sudo mkdir /MediaDrive 
    sudo chown username /MediaDrive
    chmod 777 /MediaDrive
    cd /MediaDrive
    ln -s /Users/username/Music Music
    

    This will make a directory called /MediaDrive, give ownership to your 'username' and make it r/w to all. Next the 'ln -s' command makes a symbolic link (like a shortcut) to your Music directory thats in your home folder inside this newly created /MediaDrive.

    In theory that should work just fine as iTunes will look for /MediaDrive/Music/iTunes/blahhhhh and the underlying symlink will point it at /Users/username/Music all transparently to you :)

    hope I haven't spazzed this or made it seem to complicated (just waking up)
     
  9. peanutismint thread starter macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #9
    That's cool, thanks for the suggestion! I just checked my library and the method described on that site i linked to totally worked.

    Nice. :cool:
     
  10. Spartanets macrumors newbie

    Spartanets

    Joined:
    Mar 9, 2011
    Location:
    Gloucester, UK
    #10
    Just delete the library from iTunes (but don't delete the songs from your hard drive!). Relocate the files where you want them and then drag and drop them back into iTunes. Simple. :)
     
  11. peanutismint thread starter macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #11
    No, because then the files in my many playlists won't work - did you even read the OP?! It's all sorted now anyway, thanks! :)
     
  12. blackbinary macrumors member

    Joined:
    Jul 2, 2011
    #12
    Just a tip, but using symbolic links (the ln - s command) is the best way to deal with any programs not liking their files moved.

    It makes the application the folder is where it has always been, but really points to the actual location.

    What this is really useful for is using an SSD and HDD in the optibay.

    Keep your OS on the SSD, and all your applications. For things like music, videos, etc. keep those on the HDD.

    But then you can use symbolic links to make it easier to navigate and keep everything in your home folder.
     
  13. ezgoinguy macrumors newbie

    Joined:
    Oct 29, 2008
    #13
    I wholeheartedly agree.



    Ultimately, you use iTunes to search for, and find, music. You really don't need to know where the file is stored or what it's called. If you do need to physically locate the file, just click "Show in Finder" from the context menu.
     
  14. Spartanets macrumors newbie

    Spartanets

    Joined:
    Mar 9, 2011
    Location:
    Gloucester, UK
    #14
    I apologise! I forgot about the playlists issue! I'm glad more intelligent people have been able to assist you :D
     

Share This Page