Apple Music on Windows is only syncing my purchased songs, not my entire library

I just started using Apple Music on Windows 11, transferring over from iTunes. When attempting to sync my music library for the first time using Apple Devices, only songs which I've purchases through the iTunes Store seem to be transferring over to my iPhone (exactly 138 out of 6341 songs). I have made sure all checkbox's and sync settings are correctly selected, and ensured there is adequate SSD space on my phone device, however this changes nothing and the problem persists.


Interestingly I notice that certain settings, [manually manage music, movies and TV shows] and [sync music onto (device)], become unchecked after I select to apply settings and re-sync the device. I can go back and re-check these settings, either individually or simultaneously, and every time without fail, these are automatically unselected again following a device sync and my music is not correctly mirrored.


Is there a phone settings conflict which is causing this, or security permissions? How can I get my music to sync properly?



[Re-Titled by Moderator]



iPhone 14 Pro, iOS 18

Posted on Mar 14, 2025 3:17 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 8, 2025 1:06 PM

I'm assuming the songs that don't sync still play in the library? Did you try anything similar to Repair security permissions for iTunes for Windows - Apple Community, i.e. explicitly reapply the default security permissions for all files within the media folder?


I haven't had a chance to test it, but at least one person has suggested that the latest Microsoft Store version of iTunes for Windows may not revert properly when the other apps are removed. Removing that and reinstalling iTunes from this link might help there: https://www.apple.com/itunes/download/win64.


The extra Music folder inside the media folder is standard. If you copy something into the media folder, or it starts off inside it but the Keep organized option is on, then iTunes/Music will use their layout rules. iTunes 9 introduced iTunes Media Organization which added a subfolder for Music in the media folder into which artist folders would be put, to match the existing high level folders for other media types. Now that Apple Music is focused only on Music this extra layer is unnecessary, but Apple didn't think to change the default library layout to exclude it, or provide a way to remove it. (You can still add it though if it is missing, at least in the Mac version.)


If you were running iTunes I could offer a script that could potentially fix any broken links, but Apple Music is lacking support for such niceties.


Is there any redirection going on with your Music folder? Not buried in OneDrive or something? The right hand screenshot above doesn't show the full path, but what is shown appears to agree in all the visible components. In principle iTunes/Apple Music won't reimport a track when there is already one in the library with the same absolute file path.


tt2

Similar questions

36 replies

Apr 14, 2025 2:59 PM in response to turingtest2

It seems like my post and iTunes Original File Could Not Be Found - Apple Community are related, however running Version 1.0.1.41 of the script did not work. After changing the security permissions in PowerShell to be safe it would work, the VBS file seemed to launch fine and I followed the prompts as instructed.


However running the script put it in what appeared to be a loop, or was individually showing an error message for each individual track which appeared once every ~3 seconds. Here are the 2 error's shown on repeat:


I was only able to escape the loop by exiting from iTunes, which then showed a different error:


I can confirm that each of these non-playable tracks are referencing the album folder, not the actual track file, as the location iTunes song info shows:

C:\Users\_\Music\iTunes\iTunes Media\Music\Aimee Mann\@#%&_! Smilers


Instead of what it should be:

C:\Users\_\Music\iTunes\iTunes Media\Music\Aimee Mann\@#%&_! Smilers\05 Borrowing Time.mp3

Another file example that plays correctly, and syncs to my device correctly, references a file location of:

C:\Users\_\Music\iTunes\iTunes Media\Music\Animal Kingdom\The Looking Away\02 Get Away With It.m4a


And to confirm once more, the iTunes library as selected under system>advanced preferences is:

Apr 15, 2025 7:30 AM in response to Stratiegery01

Would you mind checking which build of iTunes you are running from the Help > About iTunes menu? Was it installed via the Microsoft Store or a setup file downloaded from apple.com?


I should make that dialog box more graceful allowing for further warnings to be ignored, or to abort the script, but those aren't expected values for the Kind property when the system language is English. Typically those would be "AAC audio file" or "MPEG audio file" which is what is currently coded for in the script. Once I can see what values the particular build you have uses I can update the script accordingly. The "remote server" error is novel. That line reads:


If .TrackNumber>0 Then


where .TrackNumber is meant to be a property of an iTunes Track object previously passed to the routine. That looks like an unexpected file system error. I'll give that one some thought.


tt2

Apr 15, 2025 11:47 AM in response to turingtest2

Tried the new script version. Same issue as before, the script runs in a loop showing the identical error messages, this time though with a ~9 second delay between each.


I also noticed that when initially running the script, it only gives the option to run on the last playlist shown when iTunes was closed last. Should I try to select the full library song list from the left-side menu first, then run the script if I intend to let it amend the full library; or do you recommend doing only one playlist at a time?

Apr 15, 2025 12:03 PM in response to Stratiegery01

The script works against the current selection of tracks, or the current playlist, or all the songs in the library, depending on the conditions when the script is launched. I recommend using against a small selection of tracks that you know have an issue until it works as expected. You can then run against larger batches. Are you certain that you've downloaded version 1.0.1.42? This has the added Kind descriptions for "AAC Audio" and "MPEG Audio". I suppose there could be trailing spaces in those two values which would prevent a match. What language are you running? Still trying to work out why you have different values than I do.


As for the slow speed do you have any non-Microsoft antivirus software? If so exclude the iTunes folder.

Is iTunes creating the XML? (Edit > Preferences > Advanced). If so turning that off might help.


tt2

Apr 16, 2025 3:29 PM in response to turingtest2

Thanks. Your direct link to v1.0.1.42 worked, but the one from the website still shows the old version.


I ran the script on 2 playlists to test:


For the one which claimed 5 files were updated, because it does not show me which ones I cannot verify the script did its job, so I ran the script again on the much smaller 4-song playlist next.


For all these non-updated songs the same issue persists; iTunes thinks the track file is located in the correct ALBUM folder, but it needs to look one level down (into the ALBUM folder) in order to see the actual track file.

Apr 17, 2025 11:22 AM in response to turingtest2

I changed the code in Visual Studio, line 151 only, and saved a new script file. Running produced varied results; most files were not updated, but some were correctly. I tried several different playlists to test and overall, the script seemed to work only 1% of the time (compared to the # of tracks it was trying to resolve). Here is the only example of a somewhat-successful run:


What's perplexing is the tracks which were successfully updated with new file locations all had the same issue as any other problem track: iTunes needs to look one level down into the album folder to find the correct file. Even more perplexing is when I validated the 6 tracks here which were updated, I noticed that none of them had ID3 tag information for album, genre, etc (shown below in green). Tracing back what it did, the script worked to create a new "unknown" album folder for each respective artist, then placed the track file in that new folder. For all other tracks that already have an existing/named album folder under each artist, the script did not work.


Version 1.0.1.42 - April 15th 2025
_
Dim MatchFirst          ' Take first match when the is more than one
Dim MoreInfo            ' More dialog boxes to reveal state of processing
Dim ArtistTitle         ' Option for alternate layout
MatchFirst=True
MoreInfo=True
ArtistTitle=True
SkipLost=False
SkipMulti=False
_

May 13, 2025 4:36 PM in response to turingtest2

@turingtest2

Is there anyway I could compensate you for modifying this 'FindTracks' script through to completion? I think we've identified the problem clearly now but there seems to be some quirks in the code that is not not letting it 'connect the dots' between perceived file location and actual/verifiable file location. You've already been extremely gracious in providing your custom software to help fix this, and I would like to continue working on this problem to bring this to completion.

May 15, 2025 3:05 PM in response to Stratiegery01

Hello again. Thanks for the .itl file, it allowed me to poke a little deeper with your issue. I was able to review the non-standard kinds and update the script further for that. I could also see for myself the issue with Get Info > File tab showing only the folder that a track was supposed to be in rather than the full path. Interestingly this truncated path is readable in the script, so I have changed so that it now processes tracks with an empty path, or a path that does not include a file extension, which should help. I've uploaded a new build so please download that and see how you get on. I'm hoping it will work better for you now.


tt2

May 15, 2025 7:13 PM in response to turingtest2

Thank you!!! This latest version is a major improvement and actually works to find the tracks as intended. I've tested on 3 different playlists, building up in track quantity, testing the script's effectiveness at different levels. There are 2 bugs I notice though:

  1. On the first prompt screen I select "yes" for "process tracks automatically." However when running I am still presented with a prompt window comparing tracks and asks me to continue tracing or not. If I ever select "no" for "skip further tracing" then I no longer see the prompt windows until the script completes, but it also seems to interrupt the script processing, resulting in not all tracks being found. If I select "yes" to "continue tracing" then the script completes but I need to select "yes" for every single succeeding window. If I were to do that for my entire library then I would probably need to also set up some auto-clicker to process thousands of tracks!
  2. The script seems to run fine for 95% of tracks, but any track with an artist of "Various Artists" is skipped. The actual track is still located in a file folder one level down from where it thinks it is, same as all the other tracks being processed, but for some reasons it's getting stuck with this artist label. Perhaps it's getting confused with how iTunes organizes an 'artist' versus an album's 'contributing artist?'

May 16, 2025 1:12 PM in response to Stratiegery01

Well some progress at least. I've probably enabled too much reporting. Those two items don't have matching filenames or Soundex codes, so should never be considered as candidates for relinking. Probably be a few days before I can spend time on this again. You can disable MoreInfo and Tracing in the script options to reduce the number of prompts. What would be good to see is a few examples of what the script still fails to fix and the paths to those tracks.


tt2

May 18, 2025 2:19 PM in response to turingtest2

Here's some examples of songs which do not play in iTunes, following running this custom script:

You can see where iTunes knows where to look for the correct file location, however it still doesn't think it's been located. I can play the track just fine using VLC player or another media service so the file isn't corrupted either.


Another example would be:

The correct file location is this case would instead be: C:\Users\_\Music\iTunes\iTunes Media\Music\Nero\Welcome Reality\2808.m4a. The script should have definitely caught this example but for some reason did not make any updates.


Final example is:

iTunes is using the correct file location again, but the song still wont play within iTunes. You notice here that the metadata iTunes uses somehow got changed (I certainly did not change any track info manually), and now differs from the metadata that Windows explorer shows.

May 19, 2025 2:36 PM in response to Stratiegery01

Hello again. I've made some new adjustments. Critically if iTunes knows the correct folder, even if not the filename within it, then there is no need for the script to try searching other locations based on file properties. I've updated the script to do that, and hopefully tightened up some of the reporting for when it is having to look at different options. Please download the new build and let me know how you get on.


tt2

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.

Apple Music on Windows is only syncing my purchased songs, not my entire library

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