Skip to content
Technical library · Dependable

Syncing files to SharePoint using OneDrive and symbolic links: a step-by-step guide

The short answer

You can sync a local folder to SharePoint without robocopy scripts or scheduled tasks. Add the SharePoint library to OneDrive, then create a symbolic link on the system side that points to the OneDrive folder, not the other way round. Files written to the link sync to SharePoint and gain its recycle bin and retention.

Many organizations struggle with efficiently moving files to SharePoint. While robocopy scripts are one solution, they require scheduled tasks. Here’s a clever alternative using OneDrive and symbolic links that provides a more elegant and seamless solution.

Important note about symbolic links

While OneDrive doesn’t officially support symbolic links in the traditional direction (from File Explorer to OneDrive), there’s a workaround. By making the OneDrive folder the source and creating the symbolic link on the system folder side, we can achieve successful synchronization.

Step-by-step process

1. Setting up the SharePoint connection

  • Navigate to your SharePoint site
  • Add a shortcut to your OneDrive
  • Wait for the sync to complete

Tip: If sync issues occur, try restarting OneDrive

2. Creating the symbolic link

  • Create necessary folders in SharePoint
  • Important: Don’t create the target folder on your local system
  • Run the symbolic link command as administrator
  • Verify the creation of the shortcut-enabled folder

3. Testing the connection

  • Create test files to verify synchronization
  • Files created in the symbolic link folder automatically appear in OneDrive
  • Changes sync immediately to SharePoint
  • Note: Ensure OneDrive is running to avoid connectivity issues

Additional benefits

SharePoint integration

  • Files automatically sync to SharePoint
  • Perfect for remote monitoring of production equipment
  • Access to SharePoint Recycle Bin functionality
  • Retention period for deleted files
  • Compatible with SharePoint automation tools and PowerApps

Data protection features

  • SharePoint Recycle Bin provides file recovery options
  • Deleted files can be restored easily
  • Consider implementing additional SharePoint backup solutions
  • Integration with existing SharePoint workflows and automation

This solution offers a robust way to synchronize files to SharePoint while maintaining file integrity and providing backup options. It’s particularly useful for organizations needing to monitor logs or files from remote locations while leveraging SharePoint’s feature set.

Where we can help

Related offering · Dependable

Cloud Migration & Cost Optimization (Azure, AWS, M365)

"Can we move or merge this without breaking our apps?"

Free tool · about 2 minutes

Take the blind spot check

Four questions for a quick read, then go deeper on your weakest area.

More in Technical library

Technical library · Dependable

Protecting infrastructure with always-on VPN

How an always-on VPN with a pre-logon device tunnel and an MFA-protected user tunnel improves device authentication, user authentication and visibility.

Max Dinges · 4 min read

Technical library · Dependable

The Series: Signed, Sealed, Certified (Part One: What is a Certificate, Really?)

Part One: What is a Certificate, Really? This is going to be the first post of a 10-part series (maybe more) where I break down certificates: what they are, what they do, how they're used, and where trouble might be "creepin' 'round the bend." We're going at this with baby steps first, with a gradual crescendo into the heavier-ish items.

Nathaniel Edwards · 6 min read

All Technical library posts · All Insights

Talk to a Principal Engineer

Got a question one of these posts didn't answer? Ask the engineer who would do the work.