Today we had a client that added a second hard drive to his very impressive laptop. The problem is he wants the data on the second hard drive to be backed up and available on his OneDrive, but one drive does not allow you to specify additional folders.

Put simply, OneDrive will copy anything that is in C:\USERS\{USER}\ONEDRIVE which means it will not include a folder on the root of your C:\ or our customers new D:\ drive.

Fortunately, there is a very easy way around this. You simply need to add a “symbolic link” in C:\USERS\{USER}\ONEDRIVE to the folder you want added to OneDrive.

In the example below, we We could have created a folder and just set that to sync from the D drive that we wanted the entire drive to sync to Onedrive so we just used the Drive letter:


CLICK TO EXPAND GRAPHIC


  1. Launch a Command Prompt as an administrator
  2. Use the mklink command to create a symbolic link in your OneDrive folder that points to the folder you want to backup. The syntax is mklink /D {Current OneDrive Folder} {Additional Folder}:

    mklink /D "C:\Users\YourUsername\OneDrive\FolderName" "C:\Path\To\Folder"

    mklink /D "C:\Users\calga\OneDrive - Up & Running\D-Drive" "D:\"
  3. Press the ENTER key

If it is successful, you will see a message saying symbolic link created and you will see a folder named D-DRIVE in C:\Users\calga\OneDrive - Up & Running\

If you see “Cannot create a file when that file already exists”, You probably didn’t add a file name folder name (like D-Drive) to the command.

How To Remove a Symbolic Link

If you screw this up or just want to get rid of the symbolic link from your OneDrive for any reason, simply delete it. That’s right, you can right click on it and select delete or click on it once and press the DELETE key on your keyboard to get rid of the symbolic link. This is safe because it will only delete the symbolic link shortcut and will do nothing to your actual files that are stored where the link was pointing to.



0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *