Get local IT Support Now

Sync any folder in Windows To OneDrive

OneDrive is Microsoft’s fantastic cloud storage service, offering a seamless way to synchronise, store, and share a variety of files with others on the Internet. It’s similar to Google Drive, which is part of Google’s Workspace service (formerly called G Suite), and DropBox. These platforms make it easy for individuals and businesses to access and share files remotely, especially during times of crisis like the COVID-19 pandemic.

If you have a Microsoft account, you can enjoy 5GB of free cloud storage on OneDrive. However, with an Office 365 subscription or migrating your business to a Business Microsoft 365 setup, you’ll have access to a whopping 1TB (1024 GB) of online storage. This is usually more than enough to host an entire small business’s data on Microsoft’s infrastructure.

Despite its many benefits, OneDrive has one major limitation: it doesn’t allow you to synchronise existing folders in Windows. This can be a significant issue for businesses that want to host their shared folders online for remote access.

But don’t worry — this guide will walk you through an excellent workaround using symbolic links in Windows and the mklink command.

Benefits of Syncing Folders to OneDrive

Syncing your folders to OneDrive offers several advantages, making it an essential part of modern workflow and data management. Here are some key benefits:

Access Files Anywhere

By configuring and using Microsoft OneDrive, you can access your files from any device – laptop, tablet, or smartphone. The ability to having your files syncronised in the cloud and accessible from your devices allows you to stay productive and efficient no matter where you are.

File Backup and Recovery

Syncing folders to OneDrive ensures that your files are backed up in the cloud. In case your local computer encounters any issues or your files get accidentally deleted, you can easily restore them from OneDrive.

Real-time Collaboration

When your folders are synced with OneDrive, you can collaborate with others in real-time. This feature is particularly useful for teams working on documents or projects together.

Sync an Existing Folder to OneDrive Using Symbolic Links

To sync an existing folder to OneDrive, you’ll need to use a lesser-known feature in Windows called symbolic links. Symbolic links are advanced shortcuts to folders or files, and you can create them using the mklink command from a Command Prompt window.

Step-by-Step Guide to Sync Folders

Follow this step-by-step guide to sync any folder in Windows to OneDrive:

Download and Install OneDrive

First, make sure you have the latest OneDrive application installed on your computer. You can download it from the official Microsoft OneDrive website. Install the application and sign in with your Microsoft account.

Create a Junction Point

The next step is to create a junction point. A junction point is a Windows feature that allows you to create a link between two folders, making them appear as if they are the same folder.

Administrative command prompt (cmd) & mklink command
Open Command Prompt as Administrator Here’s a quick step-by-step guide to creating a symbolic link and syncing an existing folder to OneDrive:
  1. Open a Command Prompt window by pressing Windows Key + X and selecting “Command Prompt (Admin)” or “Windows PowerShell (Admin)“.
  2. If prompted, click “Yes” to allow the app to make changes to your computer.

Enter the Junction Command

Type the following command and press the Enter key, adjusting the originalFolder and targetFolder paths according to your specific environment:

					mklink /J "<targetFolder>" "<originalFolder>"

In this example, let’s say the original folder is C:\CompanyData, and OneDrive is configured for C:\users\jason\OneDrive. We’ll create a symbolic link called DATA inside the OneDrive folder structure:

Shared company data folder on windows 10 server
					mklink /J "C:\users\jason\OneDrive\DATA" "C:\CompanyData"
mklink symbolic link creation for shared company data - used in OneDrive external syncing

Sync Folders with OneDrive

Once the symbolic link is created, OneDrive will synchronise the entire C:\CompanyData folder to its cloud storage since it now appears inside of the OneDrive folder structure as the DATA folder.

  1. Wait for OneDrive to finish synchronising the data to the cloud.
  2. Configure the remote computers for OneDrive using the same Microsoft account.

And that’s it! You’ve successfully synced an existing folder in Windows to OneDrive, making it accessible to remote staff. For more information on the mklink command, check out Microsoft’s mklink documentation. Ready to take your small business to the next level? Explore Microsoft 365 Northern Rivers to discover how we can help you maximise productivity and collaboration.

Unleash the Power of OneDrive

Setup Microsoft configurations for your business easily. Choose us for unparalleled expertise and seamless synchronisation solutions!

Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkdin
Share on pinterest
Share on Pinterest