Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rascoop/2481852837368dff9d4756af0b31ecfb to your computer and use it in GitHub Desktop.
Save rascoop/2481852837368dff9d4756af0b31ecfb to your computer and use it in GitHub Desktop.
Sync Folders Outside OneDrive
  1. Find the Address of the folder you want to be synced. (ie. G:\Games\). Copy it.
  2. Find the OneDrive location you wish for it to sync to. Hold shift and right click. On the context menu, click open command window here.
  3. In the command window type mklink /j "YourCustomFolderName" G:\Games\ (G:\Games\ is the address of your original folder).

This is like a shortcut that tells any programs that look there to look at another directory. This will sync anything inside the address you tell it to the folder created in a onedrive directory

  1. open cmd box in admin mode
  2. cd /users/<username>/OneDrive
  3. make a link like this: mklink /J <name of folder> <name of folder to sync>

#Alternative using Powershell use an elevated powershell change to the one drive folder for the user and execute:

New-Item -ItemType Junction -Path "Link" -Target "Target"

Link is the name in the onedrive folder and target is where the data is coming from.

  1. Open Powershell in Admin mode
  2. cd /users/<username>/OneDrive or cd /users/<username>/OneDrive - <Company Name>
  3. make a link like this: New-Item -ItemType Junction -Path "Link" -Target "Target"

https://winaero.com/create-symbolic-link-windows-10-powershell/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment