Moving Windows iTunes Library to Apple Music on MacBook

I recently bought a MacBook, my first time using Apple. My old computer is a Windows 10 laptop. I have been moving files onto the new laptop, however have run into a major hurdle with transferring music.


On my Windows machine, all of my audio files are contained within the 'My Music' folder. As I am selective about what is in my music library, a smaller portion of this folder is contained within my iTunes library - 10,000 tracks to be precise, in iTunes 12. The iTunes library includes meticulously put together playlists and metadata, created over a decade. When moving files to my MacBook, I migrated the entire Windows 'My Music' folder to the 'user/___/Music' folder on my MacBook, to ensure that all of my audio files were transferred using the same folder structure.


Unfortunately, I have come to the disappointing realisation that it's not possible to transfer my music library intact to the Apple Music app... the iTunes library .itl + .xml files do not seem to work with Apple Music, and as mentioned, I do not want to add the entire contents of my 'users/___/Music' folder into Apple Music (not only would this mean I have to re-build all of my playlists & metadata from scratch, I would also have to manually delete thousands of tracks which I do not want in Apple Music).


One (failed) workaround I tried is as follows:


  • Consolidate iTunes library on Windows computer by copying the files
  • Move contents to a hard drive, transfer to Macbook
  • Import library to Apple Music
  • Delete location of files
  • In Apple Music preferences, reedirect Apple Music to 'users/___/Music' folder, where the files already exist with the same folder structure.
  • If the above step does not work, relocate files using Apple Music's 'find missing files' function


When attempting this, I found out that Apple Music's relocate function is absolutely pitiful... It can only find one file at a time, even when I choose the option to use one file's location to find the other files. I found even Pioneer's Rekordbox software has far superior 'relocate missing files' functionality!


I have spent many hours thinking about this and how to get my music library transferred, which I think is a reasonable expectation to have. My question: how can I transfer my iTunes library intact, to the Music app on my MacBook? If anyone has useful advice, please let me know. I would greatly appreciate it.



NOTE 1: I do not want all of the files in my 'user/___/Music' folder to be added to the Apple Music app, only the select 10,000 that are present in the iTunes library on the Windows computer.


NOTE 2: I do not want to use Apple's proprietary 'Music/Music/Media' folder for storing the files. My files must be kept in the 'user/___/Music' folder.

MacBook Pro (M1, 2020)

Posted on Sep 13, 2023 3:24 AM

Reply

Similar questions

17 replies

Sep 14, 2023 12:17 PM in response to Zurarczurx

7 & 8 don't quite work like that. Music uses a .musiclibrary database. You either need to option-start-Music to choose and convert the old .itl file, or import the XML. The XML will fail to import if tracks aren't where they are referenced, and while the .itl import is generally better it may not find everything if there is something non-standard about the layout of the media folder, particularly if it isn't in the same location as the .itl file. As noted in the link I posted previously I've written an AppleScript that can make a pretty good stab at repairing what Music cannot do on its own.


tt2

Sep 14, 2023 12:57 PM in response to turingtest2

Hey there! option-start the app - I have not seen this way of booting Music anywhere, and I am very glad you mentioned it!! Thank you! I am at least halfway there now - I managed to import the .itl file which was on my Windows computer. Apple Music has successfully imported the exact same library data (tracks, playlists etc).


Now the next part begins... Making sure Apple Music can find the files. I tried using the handy script file you produced, but windows keep pop up saying 'File not found at...', seemingly for every track. Looking further at the notes on your script, it looks like it might only work for folder structure which is: 'Artist/Album/Track'. Unfortunately my music master folder does not follow this structure. I'll keep trying !

Sep 14, 2023 1:02 PM in response to Zurarczurx

Thanks for your thoughtful reply. I managed to import the .itl data by option-starting the Music app. I never knew that functionality existed! So thanks to @turingtest2 for pointing that out. Now my exact iTunes Library is showing in Music. Now comes for the moment to try and locate the missing files in an efficient way... I'm considering finding them one-by-one, at least now I have the library data intact...

Sep 14, 2023 2:35 PM in response to braeburned

You shouldn't need to find them one by one...



The "missing file" issue with exclamation marks happens if the file is no longer where iTunes or Music expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, the drive it lives on has had a name change, or you've moved a non-portable library to a different path (see Make a split library portable for details). It is also possible that iTunes or Music have changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place, (see the iTunes Media Organization section of Managing your Mac media libraries - Apple Community for details) or that you've been too aggressive when deleting duplicates at some point.


Select a track with an exclamation mark, use Cmd-I to get Song Info, then click No when asked to try to locate the track. Look on the file tab for the location the library thinks the file should be. Now take a look around your hard drives. Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive label has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case. If everything is where it is supposed to be try Repair security permissions for iTunes for Mac - Apple Community.


In some cases the library may be able to repair itself if you go through the same steps with Get Info, or when playing a track, but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links. Although it says something like "use the same location" I think it expects to find the tracks in the same artist & album layout they were in previously, with one systematic change to the path.


If you want me to try to provide specific advice please post back the following details:

  1. The location of the media folder under iTunes|Music > Preferences > Advanced
  2. The location of a sample missing track shown under Song Info > File > Location that begins file://
  3. The true path to the file whose details you gave in 2



See also FixLinks - an AppleScript to repair broken links in Music - Apple Community.



tt2

Sep 14, 2023 6:59 AM in response to Zurarczurx

I've done this recently, but from old Mac to new Mac and had no problems. I think the fact that your music collection is split between what you want in Music and not is a red herring. Music doesn't care about what hasn't been imported into its library


I also have a couple of questions


"I do not want to add the entire contents of my 'users/___/Music' folder

into Apple Music (not only would this mean I have to re-build all of my

playlists & metadata from scratch,"


I don't understand why it would mess up your metadata. The tracks you want have metadata, the tracks you don't, haven't.


" I would also have to manually

delete thousands of tracks which I do not want in Apple Music)."


You could tag all the iTunes tracks on the Windows machine in a field you don't use - Grouping, BPM, Sort Composer, one of the Classical ones, etc. with "Keep". Then, assuming you can get all your music into Mac you simply create a smart playlist for all the tracks not marked "Keep" and delete them all at once. Alternatively you could import everything into iTunes on the windows machine and, assuming you successfully sort all this out, you can delete all the files on the Mac added after today using a Smart Playlist with "Date Added" is later than 14 September, or just sorting by the date added column.


If Doug can't help (see my earlier comment) and you've still got the Windows machine and it's data then I would start again and do the following.


  1. delete all your tracks in Music on the Mac - so it's like a new machine (from Music's POV).
  2. Make sure the settings in Music>Settings>Files are the same on Mac as on Windows - Keep Organized and Copy to Music Media Folder
  3. Set up the Music folder structure you want on the Mac - one that mimics the Windows machine exactly
  4. Import a few albums to Music - any old tracks, doesn't matter. Add a bit of metadata. doesn't matter. This is just to set up the catalog files
  5. Close Music on Mac
  6. Copy all your iTunes tracks - the stuff you want in Music into the same folder on Mac that they are in on Windows.
  7. Copy the xml and itl files from Windows to Mac - overwriting the existing ones on Mac. These should be in user/xxx/Music/iTunes
  8. Open Music on Mac - everything should be there. If it's not then click on something in the playlist area and it might appear.


You don't need to import anything into Music.


If you've done this then I'm sort of stuck - although I'd do it again given how important this is. The only other reason I can think of it not working is that there are hidden or special characters in the Windows directory names which means that the Music library file can't locate them in the Mac.


Best of luck, and keep us posted.




Sep 26, 2023 4:02 PM in response to braeburned

Hi,


Please accept my apologies for not getting back to you earlier. Your answer 2. shows Music's predicted location for this track. Your 3. shows an unorthodox pattern with no leading zero for the track number, and a dash where iTunes or Music would have a space. It should be possible to tweak my FixLinks script to take account of this layout.


Change these lines:


-- evaluate file name

set theFile to ""

if track number of aTrack > 0 then

set theFile to theFile & track number of aTrack & " "

if track number of aTrack < 10 then set theFile to "0" & theFile


to:

-- evaluate file name

set theFile to ""

if track number of aTrack > 0 then

set theFile to theFile & track number of aTrack & "-"

-- if track number of aTrack < 10 then set theFile to "0" & theFile



There are only two changed lines, but the others will help you identify the right part of the script to edit. The fourth line adds a - instead of space, and the last line which normally adds the leading zero is commented out.


tt2

Sep 29, 2023 4:22 AM in response to turingtest2

Thank you.


  • Here's an example of a FixLinks 'File not found at' error message (I assume this is where it's looking for the file):

/Users/camer/Music/Compilations/Modeselektion Vol. 02/3-Manic Miner.mp3


      • Actual location:

/Users/camer/Music/Modeselektion Vol. 02/Addison_Groove_-_Manic_Miner_(3-54)



  • Another one from FixLinks/Apple Music:

/Users/camer/Music/DJ Healer/Nothing-2-Loose/1-At Last (Becalming The Storm).mp3


    • Actual location:

Users/camer/Music/DJ Healer - Nothing 2 Loose/DJ Healer - At Last (Becalming The Storm).mp3


It looks like there are 2 variables at play - the assumed grouping of albums into artist folders (something which I don't do), as well as the names of the files themselves. If the script could be edited to tackle that, that may be the answer!


Thanks and eternally grafetul

Oct 4, 2023 8:48 AM in response to braeburned

Hi,


From the examples posted it seems that there isn't a consistent mapping to be had from the metadata in your files to the file path. As originally written the script can fix tracks that are in the form:


<Media Folder>[/Music]/<Album Artist>/<Album>/[D-]## <Name>.<Ext>


with some minor alternatives considered. We made a change so it would attempt to fix tracks with this pattern instead:


<Media Folder>[/Music]/<Album Artist>/<Album>/[D-]-<Name>.<Ext>


Which in hindsight wasn't quite right. I think I meant to give you another edit that would have predicted the enclosing folder of the form <Album Artist> - <Album>, but IIRC the script should work if you select the folder where the selected tracks are actually located as long as the section of the pattern after the final / is correct. (I should double-check this but I'm busy right now.)


This section of the script:


-- extend this pattern as required

set newPath to theArtist & "/" & theAlbum & "/" & theFile -- Normal <Artist>/<Album>/[D-]## <Name>.<Ext> layout

-- set newPath to theArtist & "/" & theFile -- Option for no album folders within artist folders


can be tweaked to account for different patterns for folders and filenames, although your recent examples show an additional complication in that you've got unexpected underscores in various places. Assuming that you only have a few different variations on your naming conventions it should be possible to tweak the script so it can pick up all of the tracks with one of those patterns, then tweak for another pattern and repeat the process as needed.


tt2

Sep 15, 2023 8:29 AM in response to turingtest2

Hi & thanks for the further information. In my case, unless I'm misunderstanding, I think there is just one systematic change to the path - on Windows the music was stored in 'C:\users\username\music', on Mac the files and folders are laid out exactly the same within the 'master folder', only in 'users/username/music'.


In response to your questions:

  1. Location of media folder is currently set to '/Macintosh HD/Users/camer/Music/Music Library 1/Media' which is what I created when importing the previous iTunes library .itl file. I have also tried changing the media folder location to '/Macintosh HD/Users/camer/Music' and also reverting to the default, however the issue is the same for all locations when I try to relocate multiple tracks
  2. file:///Users/camer/Music/Music Library 1/Media.localized/Music Library 1/Media.localized/Music/Afrikan Sciences/Circuitous/05 Circuitous.mp3
  3. /Users/camer/Music/Afrikan Sciences - Circuitous/5-Circuitous.mp3


Thanks for any further help you may be able to give! I really appreciate it.

Sep 28, 2023 9:13 AM in response to turingtest2

Hey, no need at all to apologise - I greatly appreciate the fact that you are taking time out to help a fellow person on the internet. Thank you for your time and all of your insights!


Thanks for the edited version of the script - I tried that but unfortunately it did not work. I think editing the script will be the way forwards though... I realise that Apple Music (or is it FixLinks?) tries to find music using the format User/Music/Artist/Album/Track. In my case, however, files are either within a folder for that particular album [ e.g. User/Music/Black Sabbath - Paranoid (1970) ], or they are just 'loose' in the User/Music folder... Is there a way to amend FixLinks to follow this way of organisation? I'm aware it's not as rigid as the way that Apple Music sorts its library by default..


I am truly grateful for your time and expertise. I would love to find a way of paying you for your time, but I guess that's not allowed on an Apple forum! I just hope that people experiencing the same hurdles as me find this thread in the future...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Moving Windows iTunes Library to Apple Music on MacBook

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.