Synchronize any online folder in the Clouds with symbolic links

The great cloud storage services: Dropbox, Google Drive, Microsoft OneDrive and the others all have the same problem: they can only synchronize the main folder and everything you put in it but you cannot choose the folders without moving them to that special area .
To get around this limitation and synchronize online, in one of these cloud services, any folder on your computer, without having to move it and without creating a copy, you can use symbolic links, a little-known function present on all computers.
Symbolic links are extremely useful for moving folders without your computer noticing, then creating a link, different from the classic one which is only a reference.
This is useful, for example, to move a file or a system folder or a program without, however, making the computer think that it has been moved from its original position (where it must be for the program to work).
Programs on the computer will see the symbolic link as if it were the same real folder.
To understand symbolic links you can read this guide on how to create symbolic links to move folders .
In this concise guide, given the concept of symbolic link for good, we see what commands to use to synchronize a folder in Dropbox, Google Drive, Onedrive or other cloud services without having to move it .
For example, let's say you would like to synchronize the files in the C: / documents folder in Google Drive, without wanting to move it from that convenient position to reach.
You can then create a symbolic link in the Google Drive folder pointing to C: \ Documents and have it synced online to cloud storage.
What you need to do is move the entire C: \ Documents folder to the Google Drive folder and then create a symbolic link to C: \ Documents indicating the Google Drive \ Documents folder.
On Windows, open a command prompt window as an administrator.
The command prompt opens in Windows 8.1 or 8, pressing the Windows + X keys while in Windows 7 it is found in the Start menu -> Programs -> Accessories and must be run as administrator by pressing on it with the right mouse button.
From the command prompt, write the following commands and run them by pressing Enter.
move "C: \ Documents" "C: \ Users \ Username \ Google Drive"
Obviously the paths will have to be changed: the first folder is the one to be moved, the second one is the folder of the storage service which can be Google Drive or another such as Onedrive.
To create a symbolic link in its original position so that you can find it where it was before running this command:
mklink / d "C: \ Documents" "C: \ Users \ Username \ Google Drive \ Documents"
On Linux you can create a symbolic link directly with the ln-s command, without moving files.
ln -s / path / to / documents ~ / Google Drive /
To synchronize a single file, specify the path of the file instead of the path of a folder.
If this method does not work, first move the external folder inside the cloud storage folder and then create the symbolic link as you do on Windows.
On Mac OS X the command is the same as for Linux.
Open a terminal window, press Command + Space, type terminal in the Spotlight search window and press Enter.
Then, with the right paths, run the command:
ln -s "/ path / documents" "/ Users / name / Dropbox / Documents"
Google Drive does not accept the symbolic links created with this command therefore, for Google Drive, move the folder you want to synchronize within the cloud storage folder and create the symbolic link in the opposite direction:
mv "/ path / to / documents" "/ Users / name / Google Drive /"
ln -s "/ Users / name / Google Drive / documents" "/ path / to / documents"
This trick can be used on multiple computers where Google Drive is installed to have that folder in the same position, synchronized and identical between the various computers.
I had already talked about this in the past explaining how to use the same folder shared between PCs with Dropbox or Onedrive .
Some programs allow you to synchronize any folder in the cloud such as, for example, SpiderOak.

Leave Your Comment

Please enter your comment!
Please enter your name here