Linking a Local Folder with Microsoft’s One Drive

You may want to sync a folder on your computer with OneDrive that isn’t one of the Windows standard C: drive folders like “Documents”, “Pictures” etc. If that’s the case, here’s the command line for you to use to link any folder with OneDrive.

mklink /j “<path to configured OneDrive location>” “<path to directory you want synced>

So, if I had a folder called “photos” on the D: drive that I wanted uploaded and synced with my OneDrive, and my OneDrive was configured to exist at c:\onedrive (the default is C:\users\<username>\onedrive) I’d do the following command in a Command Prompt window:

mklink /j “c:\onedrive” “d:\photos”

You’ll see the “photos” folder appear in your OneDrive, and the OneDrive app should start syncing the files from your local storage to the remote cloud-based storage.