How To Synchronize Folders In The Cloud Using Symbolic Links

How To Synchronize Folders In The Cloud Using Symbolic Links

by Gary Oldwood on 7 January 2017 · 3784 views

Using symbolic links to synchronize folders in cloud services is an advanced method with several advantages, and many users do not know the existence of such links and their conveniences.

In this article you’ll see what symbolic links are, how they are created and how they help in managing your files.

What are symbolic links?

You could say that symbolic links (symlinks or soft links), are advanced shortcuts of files and folders. The functionality of symbolic links is similar to that of the simple shortcuts you’re aware of, but it has significant differences too.

6 full How To Synchronize Folders In The Cloud Using Symbolic LinksUsual shortcuts are files that have been designed to help the user open the file that they point to. Even if you do not create your own shortcuts, you must have seen those created when installing an application, in the start menu or desktop.

In fact, those shortcuts consume an insignificant amount of space (just a few KBs at most).

Symbolic links are not files and take up no space on the disk. Instead, they are references in the filesystem. More specifically, symbolic links are file/folder pointers that lead to a different location. This location could be a folder or file on the same disk, or even on a different disk partition.

So, while programs separate shortcuts and the files/folders that they point to, symbolic links are treated just like their corresponding destination files and folders.

This particular property of symbolic links provides important advantages, some of which are:

  • Folder synchronization in cloud services
  • Transferring an application’s folder to a different location.
  • Moving photos and music to another disk, while they are still displayed in their original location.

Summarizing, symlinks may assist in better management of your disk space, since the creation of identical copies of files is reduced significantly. Additionally, organizing and accessing files from different locations becomes easier.

Differences between symbolic links and hard links

Apart from symlinks, there is also a special form of links in the filesystem called hard links. But it’s highly unlikely that you will find them useful in your everyday computer use.

Hard links are links that redirect to a different location too, but you cannot use them for folders- they're only used for files.

Also, hard links are located only in the same disk volume of the file they point to. A hard link cannot point to a different disk partition.

Method 1: Creating Symbolic Links with Link Shell Extension

Windows has the ability to create symlinks using the command line, but this way it’s quite difficult and will probably scare novice users.

Downloading and installing Link Shell Extension

To create symbolic links easily from the Windows menu, you will need to install two free applications.

The first program is Microsoft Visual C ++ 2005 redistributables, which is a package with a collection of Microsoft applications for the correct functionality of other programs. This tool contains is required for the second application. It is available for 64-bit and 32-bit systems, so select the one that is supported by your system and install it by executing the file you downloaded.

Get Microsoft Visual C ++ 2005 redistributables for 32-bit systems (x86) here

Get Microsoft Visual C ++ 2005 redistributables for 64-bit systems (x64) here

The next program you need is called Link Shell Extension and contains features for managing files and folders with symbolic links. Also, LSE allows for the easy creation of symlinks using Windows Explorer or another third-party file/folder manager.

Using Link Shell Extension to create symbolic links

Most games on Steam make automatic backups of save files in the corresponding Steam account, but there are some games that do not support cloud backup via Steam. For these games, or if you wish to keep a second backup of your saves in your personal cloud, symbolic links are the ideal solution.

In this example we’ll see how to synchronize a Save folder of a Steam game with symlinks with the desktop application of Dropbox. The process is performed in a similar way for other cloud services too.

First, navigate to the location of the game’s Save folder. This could be, for example, in the Documents folder, or the game’s installation folder.

1 large How To Synchronize Folders In The Cloud Using Symbolic Links

Next, move the Save folder to Dropbox and wait for the upload process to complete. This action is performed normally via cut-paste (not copy-paste).

2 large How To Synchronize Folders In The Cloud Using Symbolic Links

Then you will have to create a symbolic link to the original location of your file. To do that, navigate inside the Dropbox directory, right-click on the Save folder that you just moved and select Pick Link Source.

3 large How To Synchronize Folders In The Cloud Using Symbolic Links

After having done that, navigate to the original directory of the Save folder, right-click on an empty space and select Drop here… -> Symbolic Link.

4 large How To Synchronize Folders In The Cloud Using Symbolic Links

These new options in the context menu were added by Link Shell Extension.

So, now you have created a symbolic link that represents the Save folder in Dropbox, and Steam recognizes it normally, as if it is the original folder. Creating a simple shortcut in this case would not work, because it wouldn’t be recognized by the program.

If you right-click on the symlink folder and open its Properties menu, you will see that its actual position is somewhere else.

Finally, if for some reason you no longer want the symlink, simply delete it like a shortcut. Your folder in Dropbox will not be affected, and it will continue to exist as before.

Method 2: Creating symbolic links via the command line

Let’s see how we can create symbolic links by using the command line, without installing any other application.

The command format is the following:

mklink /d <path to create symbolic link> <path of folder that the created symbolic link refers to>

So, open an elevated command prompt, and replace the paths with your own- this will create a symbolic link on the location you specified, referring to a folder you specified.

5 large How To Synchronize Folders In The Cloud Using Symbolic Links

As you can see, creating symbolic links is quite easy. If you have any problems or questions, don’t hesitate to let us know by posting in the comments section below!

See alsoMKLink Explained: Create Symbolic Links that Simplify File Management in Windows Vista, 7 and 8. Works on Windows 10 as well.

Comments (0)
Featured Articles