June 15 2017

Syncing OneDrive folder located across multiple disk drives

I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.


OneDrive doesn’t have the option to select folders from multiple disk drives – this wasn’t a problem for other online storage/synchronization tools that I have used previously, however OneDrive wants you to simply selection one “root” folder and it will only included files/folders beneath that.

I have a scenario where I have a 100GB SSD disk for frequently accessed files and a 1TB slower SATA disk for photos and archives. I have files and folders in both drives that I want to be synchronized to the OneDrive “Cloud”.

So to do this I needed to use the Windows command line tool MKLINK to create a symbolic link.

C:\Users\danovich\OneDrive\         <——- “Root” OneDrive folder, located on the 100GB SSD drive
D:\Data\Photos\         <——- Photos folder, located on the 1TB SATA drive, containing 500GB of photos I want to be sync’d into OneDrive

Open a command prompt with admin privledges and type:

mklink /d "C:\Users\Dan\OneDrive\Photos" "D:\Data\Photos"

You’ll get a success message:

symbolic link created for C:\Users\Dan\OneDrive\Photos <<===>> D:\Data\Photos

Data will now be syncing with OneDrive and the “Photos” symbolic link, essentially a shortcut, will appear in the OneDrive folder:

I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.


Tags: , , , , , ,

Posted June 15, 2017 by danovich in category "Geek", "Tools", "Windows


  1. By Jehmeema on

    S’times I can never access my images off the damn cloud ! This frustrates a sister like no end . I hate it when it takes so long. Found the information solit, useful.

  2. By Turismo CaNica on

    ok…dumb question. I successfully created the link. But I cannot access the link within the Onedrive folder on my desktop. It says the location is Unavailable. There are files in the location I linked to but how do I verify that OneDrive is syncing them? When I sign in to OD Online, the Linked location/shortcut does not show up.


      1. By Justin on

        I found that using mklink /j worked for me where mklink /d did not.

  3. By bgolinvaux on

    Be VERY careful with this. I know, for instance, that when you do this in Dropbox, and if the linked hard drive is disconnected or unmounted for any reason (less likely with internal drives, of course), Dropbox “thinks” the folder has been emptied by the user and proceeds to remove all the remote file. What’s even worse : when the drive is eventually connected, Dropbox erases its whole content! I’d perform a small test to check for OneDrive behaviour in that particular case. (I apologize in advance for my grammar and typos, for I am French speaking 🙂 )

  4. By Eduardo on

    Hi! Great post. What if I use the same external HDD in different computers? Do you know how to configure the link? I tried to configure a symbolic link in another computer, however I got an error message telling that the folder already existed.

  5. By Ricky Roberts on

    Thanks so much for posting this. I was looking for a way to backup a second HD I use to store downloads to OneDrive and with a slight alteration to your command I now have this working. Just in case someone else wants to do the same here is the command I used: mklink /d “C:\Users\rrobe\OneDrive\Stuff” “B:\” (where Stuff is linke synbolic link being created and B:\ is the actual drive on my computer).

  6. By Stephen Rawnsley on

    Excellent advice. With new laptops having 2 disks how has MSofty not made this simple???

  7. By Iv on

    Thanks for posting this. It looks good but doesn’t work for me. I get the cloud is currently syncing icon (circular arrows) but it never syncs. The folder doesn’t appear online. If I try to right click and try ‘always keep a copy on this device’ I then get an “Invalid MS Dos Function” dialog box. I have tried both mklink /d and mklink /j.

    Any thoughts please?


Leave a Reply