In this article, I’ll walk you through the steps to create symbolic links so that you can sync any folder on your computer with your cloud service without moving it. Note that Google has a separate program called Backup and Sync that allows you to choose any folder(s) on your computer to backup to Google Drive, which I will explain below.
Sync Folders to Dropbox and OneDrive
Before I get into the steps for OneDrive, I wanted to mention that they now have an option called AutoSave that lets you move the contents of the Desktop, My Documents and Pictures folders to OneDrive without having to do anything on your part. Basically, they point the local folders to the OneDrive folders to make it seamless.
However, it’s only for those three folders. If you have a folder saved somewhere else, you’ll need to either move it to the OneDrive folder or create a symbolic link. To get this done for Dropbox or OneDrive, I have created an example to walk you through the process. As you can see below, I have my OneDrive folder on the left and a folder called OneDrive Test inside C:\Test.
So I want to sync the OneDrive Test folder to my OneDrive account folder without moving it. To do this, you have to open an elevated command prompt and type in the following command:
So there you have it! Now you can sync any folder on your computer with your cloud service. Either you’ll have to create a symbolic link or there may be a feature whereby you can pick the folders you want to sync.
However, it’s only for those three folders. If you have a folder saved somewhere else, you’ll need to either move it to the OneDrive folder or create a symbolic link. To get this done for Dropbox or OneDrive, I have created an example to walk you through the process. As you can see below, I have my OneDrive folder on the left and a folder called OneDrive Test inside C:\Test.
So I want to sync the OneDrive Test folder to my OneDrive account folder without moving it. To do this, you have to open an elevated command prompt and type in the following command:
mklink /J "C:\Users\Aseem\OneDrive\Personal" "C:\Test\OneDrive Test"
So let me explain what we are doing here. We are creating a symbolic link (symlink) using the mklink command. It takes two parameters: the first is the location of the symbolic link you want to create and the second is the source directory. As you can see, I don’t need to create the Personal folder in the OneDrive folder, the mklink command will do that for me. Also, you can use any name you want for the folder.
So I am telling Windows to create a symbolic link folder in the OneDrive folder called Personal that is actually just pointing to the C:\Test\OneDrive Test folder. After the link is created, you’ll see the Personal folder inside of OneDrive folder:
If you open that folder, the path will show as if it’s stored in OneDrive\Personal, when it actually is stored in the Test folder. So now you can add files to the folder from either location and both will have the same contents since it’s actually one folder, not two. That’s it!
OneDrive and Dropbox both support symbolic link folders and will sync everything up to the cloud like shown below:
Sync Folders to Google Drive
For Google Drive, start by downloading the Backup and Sync software mentioned above. Once you start the installation, you’ll get the following screen for step 2:
By default, it will select Desktop, Documents and Pictures, but you can click on Choose Folder and pick any folder you want. You can also click the Change link to backup only photos and videos or add file extensions that you do not want to sync.
In step 3, you choose which folders you want to sync down to your local PC. What I normally do is just uncheck Sync My Drive to this computer, since I’m only using it as a backup for my PC.
So there you have it! Now you can sync any folder on your computer with your cloud service. Either you’ll have to create a symbolic link or there may be a feature whereby you can pick the folders you want to sync.