Sync your iTunes Library with OneDrive

You could be copying and pasting your iTunes Music Library folders over into your OneDrive Music folder manually and have them show up in Groove Music apps and on the Xbox. This would require you to merge and handle conflicts manually as you buy new songs on iTunes and want to keep your Groove catalog in sync. Instead we’re going to utilize the magic of NTFS Directory Junctions in Windows 10 to have OneDrive and iTunes share folders and stay in sync without duplicating files.

Groove Music — formerly Xbox Music — offers apps for Windows, Xbox, Android, iOS, and a web player where you can listen to your music collection through the OneDrive file hosting service. Any song you put in OneDrive’s music folder will be available for streaming in Groove Music. You’ll have to pay for OneDrive storage beyond the first 30 free gigabytes, but there’s no extra “Music Pass” or add-on music subscription required to use it with your music.

Some words of caution before proceeding. Don’t create a NTFS junction between two folders that both reside in the OneDrive folder. This will result in an infinite loop and can result in the files being deleted locally and on the server. Be aware that deleting a file from iTunes will delete it from OneDrive and visa versa while the two folders are linked! Do not attempt this on Windows 8 or 8.1! It will seemingly work, but a underlying system in Windows used by OneDrive on these two versions of Windows called “shadow files” may cause you to loose your files when they’re linked like this. The special shadow files system no longer exist in Windows 10 and is thus no longer a concern.

  1. Make sure to create the OneDrive Music folder by logging in using this link
  2. Open the OneDrive folder on your computer after a minute and check that the Music folder have appeared

You can now proceed to set up the syncing connection between iTunes and OneDrive.

Windows 10:

  1. Open the Command Prompt by searching for “cmd” in the Start menu
  2. Type in the following command in one line carefully and press Enter:
mklink /J "%USERPROFILE%/OneDrive/Music/iTunes Library" "%USERPROFILE%/Music/iTunes/iTunes Media/Music"

The above comment creates what’s called a “NTFS junction”, making the two folder paths indistinguishable from each other. OneDrive will sync what it sees as a “Music/iTunes Library” folder inside your OneDrive folder. When it starts reading data from that folder, it’s rerouted to read from “Music\iTunes\iTunes Media\Music” in your home folder, where iTunes normally stores your music files. This saves you from having two sets of the same files and you don’t have to worry about keeping two folders in sync – as they’re now the same folder.

If you’ve got OneDrive set up to sync all your files to more than one computer, the entirety of your iTunes Library will be downloaded on the secondary computer. It can be a good idea to open OneDrive Settings exclude the “Music/iTunes Library” from being synced to other computers.

You can adjust the folder paths in the above example commands to sync your videos, ebooks, or any other folder you want to stay where it’s on your computer but still want to synchronize it with OneDrive. Note that your iTunes movie collection is restricted by DRM and thus you can’t play them back on Windows or Xbox through OneDrive.

The above instructions assume default folder paths. You should double check them by looking in your home folder before proceeding. If you’ve made changes to the default folders, make sure both your iTunes Library and local OneDrive folder are still stored on NTFS-partitions and adjust the paths accordingly. If none of that made any sense, it probably doesn’t apply to you either.

OneDrive may spend a significant time to upload all your songs, and even more time processing the songs after they’ve been uploaded. Your music should start showing up in Groove Music after a few minutes. If no music shows up, double check that it’s being uploaded and are appearing in your OneDrive Music folder. If that still doesn’t help, have a look at the Groove Music+OneDrive frequently asked questions page. Note that Groove Music+OneDrive isn’t available in all countries.

You can automatically move any Groove purchase to your iTunes library and — assuming you’ve followed the above instructions — have them sync back up to OneDrive. Using this method you’ll move the files out of the Groove folder in Windows and into your iTunes folder instead and from there up to OneDrive and back to Groove. A bit complicated to follow, but it means Groove purchases will be available everywhere.

Windows 10:

  1. Type in the following command in one line carefully in the Command Prompt and press Enter:
mklink /J "%USERPROFILE%\Music\iTunes\iTunes Media\Automatically Add To iTunes\Groove Purchases" "%USERPROFILE%\Music\Purchases"

When syncing Groove-purchases to iTunes, you should double-check your app settings for the two media apps. Look in iTunes Preferences: Advanced to see that you’ve enabled both the ’Copy Files to iTunes Media folder when adding to library’ and ‘Keep my iTunes Media folder organized’ options (they’re enabled by default). In Groove Settings, check that ‘Automatically download songs here after you buy them on other devices’ is enabled. This will make sure any new purchase you make gets synced to iTunes and thus OneDrive.

By changing the folder paths in these instructions, you can have your Groove Music or iTunes sync with other cloud services like Dropbox, Box.net, and Google Drive as well. These other services don’t offer as good a media player as the Groove+OneDrive combo, but they’re useful for backups. You can link one folder to multiple locations, but avoid putting linked folders into each other (chaining).