2

I'm trying to move my iTunes library to a new location. I'm running iTunes without the "organize media" option because I keep my library (60000+ songs) on a second drive in my MacBook... I recently upgraded to a new MacBook with a lot less storage but found out that you can run iTunes from a WebDAV cloud server without any noticeable lag (Yep!). I already have an exact copy of my second drive on the server but now I would like to know the simplest way to change the paths for all tracks in bulk? I've found some solutions myself but it would take literally weeks to complete:

  1. When playing a song that is not in its current position, iTunes will ask for the new location of this file and then will try to find other missing files in that same directory (so only that cd is imported). The importing itself is slow as well but that's probably due to the server.

  2. Doug created a script that can change the location of selected files without losing metadata/rating but 500+ albums would take a too long :(

I hope there is a simpler and faster way changing the paths since this is the last step holding me back from running my library from a cloud server. For those interested, I can't store the library files on the cloud server as iTunes rewrite the library file (200mb) every time you change a rating so I keep my libraries in sync with a bitbucket server and source-tree.

Thanks!

2

The locations are hard-coded, absolute not relative, so you need to find & replace
file:///Volumes/Macintosh HD/Users/[yourname]/Music/iTunes/
with the actual path - file:///Volumes/mountpoint...

This would have been a single step find/replace on the iTunes Library.xml [which it is far better to keep in its original location even without the added complexity of a remote write] using something like TextWrangler/BBEdit if the library was consolidated to start with. As it isn't, you might have multiple steps to do, depending on how broad your "path-scape" is. .

It's been quite some time since I did this - the next step doesn't seem to work the same as it used to - see iTunes: Moving iTunes Files (Self Managed)

Breaking the .itl no longer works with recent iTunes versions - it just complains it's damaged & makes a new one itself, which loses everything.
I think last time I tried it I think I just left the .itl as it was & it ran OK (I'm open to correction on that if someone cares to try it, I'm not going to do it 'just to see' ;)

Related & possibly worth a read-through too, for general background & it also covers recent iTunes variations in method - How to share an iTunes library between Mac & Windows?

BTW, I think you ought to still be able to use 'Organise Media' using a remote library - though mine is just on a different drive, not a different server, so I haven't tested that scenario.

  • 'Somewhere along the way'... could you be more specific? Last time I did my [probably annual] sync to update my PC's remote library, the method in my last link worked the same as it ever had, once I'd figured out the new .itl twist. [BTW, I didn't say iTunes Music Library.xml said iTunes Library.xml – Tetsujin Aug 1 '17 at 19:34
  • 1
    Then we're all stuffed. One more reason not to install Sierra... I now have too many to list. – Tetsujin Aug 1 '17 at 19:41
  • Have a look at: About iTunes library files "By default, iTunes 12.2 and later doesn't create an iTunes Library.xml. If you're using OS X Mountain Lion or earlier or a third-party app that uses the XML file, you need to enable Legacy library XML support:." – user3439894 Aug 1 '17 at 19:48
  • 1
    Then we maybe have a get-out clause - enable "Share iTunes Library XML with other applications." & again Thank you Apple for making our lives just that little bit more difficult to self-manage year on year, – Tetsujin Aug 1 '17 at 19:52
  • It created the .xml when I checked the box, but not sure to what degree the statement "The iTunes Library.xml file contains some, but not all, of the same information that's stored in the iTunes Library.itl file." will affect things. – user3439894 Aug 1 '17 at 19:56
0

Ok after some days of googling I found a way to keep my original paths in my iTunes library but in some way link them to a different location using symlinks. Here is what I did to fix my problem:

My iTunes library was linked to all my files in /Volumes/Data/Music so when copying my library file to a different laptop without a "Data" drive iTunes will not find the files...

I'm using mountain duck or cloudmounter to mount a 1TB WebDAV cloud server as a normal mac drive. this drive holds an exact copy of all the files in /Volumes/Data/Music. This drive is located under /Users/steven/Library/Containers/com.eltima.cloudmounter.mas/Data/.CMVolumes/Music/

When creating a symlink you sort of trick mac to see /Volumes/Data/Music but when browsing to this location you will see the content of the mounted drive, this can be done by opening Terminal and run this command:

sudo ln -s NEW_LOCATION LIBRARY_OLD_LOCATION

so for me this would be

sudo ln -s /Users/steven/Library/Containers/com.eltima.cloudmounter.mas/Data/.CMVolumes/Music/ /Volumes/Data/Music

The great part is that iTunes thinks all the files are just there and plays them as you would expect without changing anything to the library... so on my old laptop I can just keep the Data volume and play from there. As an extra automatically sync all folders from my old laptop to the webdav and server vice-versa so whenever I add songs on any of my laptops the file gets added to the other devices

If you want to remove this link you can do:

unlink /Volumes/Data/Music

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .