This article contains information that applies when you use the OneDrive for Business sync client (groove.exe).
NOTE: To determine which OneDrive sync client you're using, see Which OneDrive sync client am I using?
Consider the following scenario:
You have configured a OneDrive for Business or SharePoint Online library to sync to your computer by using the OneDrive for Business sync app.
You want to use an additional local path for file synchronization, but you can’t configure it in the sync app.
To work around this issue, use symbolic links to link a local path of the local OneDrive for business sync folder. Files that are put in the linked location will be added to the local OneDrive for Business folder and will be synchronized to your OneDrive for Business or SharePoint Online site.
The mklink command is used to create symbolic links at the command prompt. To create a symbolic link to a folder, you must first create a target folder in the local OneDrive for Business location and then use the following command:
mklink /d \Path to Link\Path to Target
Note In this scenario, Link is the new link that you're creating and Target is the location of the current OneDrive for Business synchronized location. For example, the command should resemble the following:
mklink /d c:\OneDriveLink c:\users\username\OneDrive @ Contoso\Folder
You may have to use the Run as administrator option to run the command at an elevated command prompt.
For more information about the mklink command, see Mklink.
NOTE: In the context of the mklink command, the original folder, or <Target>, must be the OneDrive for Business directory that's already synchronized. The new path for synchronization, or <Link>, then links to the target location.
OneDrive for Business sync indicators (the green check mark or red X) don't appear on files that are accessed through the folder link. These files will still be synchronized and the status indicators will still be available in the original OneDrive for Business local folder location.
NTFS symbolic links (also known as symlinks) must exist on the same drive and partition as the target.
We don't recommend that you sync any system directories, and this includes the My Documents folder. Doing this may cause issues with various limitations in the OneDrive for Business service. These limitations include path length, characters, file size restrictions, and issues that involve adding metadata in XML-like files.
Symlinks aren't completely transparent to applications. Syncing application folders or protected system folders by replacing them with a symlink will likely lead to issues.
You cannot sync folders on other partitions or disks by using this method. Symlinks must exist on the same drive as the original file.
You cannot use this workaround in reverse. The original or <Target> folder must be located in the OneDrive for Business directory.
Still need help? Go to Microsoft Community.