Skip navigation

Transfer nas-based iTunes library from Windows-PC to mac

2249 Views 10 Replies Latest reply: Jan 17, 2013 3:52 PM by gazzabhoy RSS
Zwockel Calculating status...
Currently Being Moderated
Nov 26, 2012 1:57 AM

I want to migrate a nas based music library with more than 25,000 files. I read article and transfered the files per external drive without prior consolidating. The files should reside at the nas of course. I want to retain the directory structure of my nas because other devices (as network players) should access the audio files too. I didn't use drive letters to access the audio files with my Windows-PC, I used the unc-filename convention.

Therefore the location of a audio file is for example //nas/audio/MP3/Musik/songs/r/Ram Jam - Black Betty.mp3


Copying iTunes Folder

Having copied the files into the Music/iTunes folder on my mac almost everthing is fine but the music files are marked as missing ("!"). The location then is shown as file://localhost//Nas/audio/MP3/Musik/songs/r/Ram Jam - Black Betty.mp3. When I point iTunes to the location of the file it changes to /Volumes/audio/MP3/Musik/songs/r/Ram Jam - Black Betty.mp3


Editing iTunes Music Library.xml

I edited the iTunes Music Library.xml using TextEdit. Interestingly the location there was before

<key>Location</key><string>file://localhost//Nas/audio/MP3/Musik/songs/r/Ram%20J am%20-%20Black%20Betty.mp3</string>

and is now

<key>Location</key><string>file://localhost/Volumes/audio/MP3/Musik/songs/r/Ram% 20Jam%20-%20Black%20Betty.mp3</string>


I closed iTunes and replaced all occurences "file://localhost//Nas/" to "file://localhost/Volumes/" saved the file. This method worked under Windows when I moved the audio files to another nas-box. Apparantly iTunes uses the iTunes Music Library.itl file which is binary, so this did not work.


Importing iTunes Music Library.xml into empty iTunes

I found another link and i tried to import the edited XML-File into an empty iTunes. but that did not help.


Scripting iTunes to modify Location

I started to code an apple skript to set the Location, but I was not able to read the Location attribute of the track item. All I got was "Missing"-Value.




So I'm stuck at the moment. The austrian-apple-support guy was friendly but his help was to suggest to address the problem to the support community.


I think nas-boxes with huge audio librarys are quite common these days so I hope someone has solved that problem.


Many thanks in advance.

Mac mini (Late 2012), iOS 6.0.1
  • JonHands Calculating status...

    Hi Zwockel,


    Thanks for your post. I am willing to give your script a try as i am having the same problem with my nas and iTunes. Just wanting a little leg up to get started, when you say envoke the script is that copying your script into a text editor and the editing it so that it matches my conditions? Then running it via the terminal?






  • gazzabhoy Calculating status...

    Hi Zwockel, yours I think is the closest to a problem I have had for a few months now so I hope you may be kind enough to help me get access to my music library again... !


    I updated my NAS (Netgear Stora) a while ago and since then for some reason I couldn't connect to it again in the same way from my macbook pro, as I had previously done (by selecting the drive on the left of my Finder window and click connect now) and so I have lost the path to all my music on the NAS. I've narrowed the problem down to this issue with the path (netgear must have changed something in the protocol in how it connects to Mac OS but they have been no help?), and how the Mac connects to the NAS.


    My itunes music library.xml says the path to my music is Location</key><string>file://localhost/Volumes/garyreid/MyLibrary/MyMusic/My%20 Burned%20CD%20Collection/3%20Colours%20Red/Pure/01%20Pure.mp3


    but when I am connected to the NAS the way I can now, the path is directly to /Volumes/MyLibrary - no reference to garyreid which is the NAS username.


    So, I either need to sort out the reason for this change in connection between the NAS and Mac or find a way to mass change the path of all things in my library that were on the NAS to exclude the /garyreid/ part? There is music, film, audiobooks and video and podcasts that are stored in the local itunes music folder that I can obviously still access and don't want to change the path of.


    I'd be very gratefull for any thoughts/help.





  • gazzabhoy Level 1 Level 1 (0 points)

    Hi Zwockel I think that is exactly the problem....


    Your first work around seems straightforward but I have no code experience, I presume I just copy and paste this with the correct NAS detail into terminal? Will I have to do this each time to mount the NAS? Also if you have a minute to explain what the two different options are doing that would help...


    Thanks again



  • gazzabhoy Level 1 Level 1 (0 points)

    Hi Zwockel,


    getting error message after the second line :

    mkdir /Volumes/garyreid/MyLibrary >/dev/null


    Error:"mkdir: /Volumes/garyreid/MyLibrary: Permission denied"


    So I created the MyLibrary folder manually in finder and when I run the 3rd line nothing seems to happen other than I get the following from "usage":

    mount -t smbfs //garyreid:xxxxx@STORA/MyLibrary/Volumes/garyreid/MyLibrary >/dev/null

    usage: mount [-dfruvw] [-o options] [-t external_type] special node

           mount [-adfruvw] [-t external_type]

           mount [-dfruvw] special | node




  • gazzabhoy Level 1 Level 1 (0 points)

    Latest version of OSX, but fear not as I played around with your second option and created a symbolic link called garyreid in the volumes and that seems to work... Can be a bit slow exploring sometimes but overall really happy as I can play my tunes!!


    Thanks so much for your help.




More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.