How to Sync Any Folder to OneDrive in Windows 10

OneDrive is free online storage that comes included with Windows 10 and used with your Microsoft account. By default, you can only backup predefined folders setup by OneDrive. In case you have some folders in another drive or external device then you will have to manually drag and drop the files into the folder every time there is a change.


An alternate to this is to create a new folder on the Onedrive folder and then link that folder to the external folder you want to sync. You can achieve this by issuing the below command.


  1. Open the command prompt and run as administrator.

  2. Type the command below into the command prompt, and press ENTER.

mklink /j "%UserProfile%\OneDrive\Folder Name" "Full path of source folder"

For example:

mklink /j "%UserProfile%\OneDrive\Example Folder" "F:\Example Folder"

Once you do so you will get a confirmation saying Junction created. After this, any changes or new documents made or created will be automatically synced to your OneDrive account.


16 views