How to synchronize directories outside the Google Drive directory

I installed Google Drive and want to use it in order to backup some data scattered across my HDD.

I cannot get it to use these different directories because I can set only one folder in Google apps. I tried to create junctions and hard links to the outer directories, however it does not work ... any ideas how to correctly set it?

-
do you see the hardlinked folders in the options? – Jay May 4 '12 at 0:58
I cannot see them – Darqer May 4 '12 at 7:10
@jay - Those aren't hardlinked folders. Those are just subfolders under the Google Drive directory. – Howiecamp Sep 28 '12 at 22:49

You could use what I used when I had the same issue with Dropbox. And that's to use: NTFS Junction Points like you said.

It's pretty much a worm hole in the file system that makes a shortcut without appearing like one to applications. There are downsides to using these as an antivirus would scan both folders (despite physically being the same), amongst other things.

Try something like Junction Link Magic instead of command lines if it helps.

Update: it appears JLM does not create junction points the way we wanted. Instead use Junction Master which creates hard links, and that will lie to applications the way we need it to. You can read more here.

Creating a link in Junction Master will allow Google Drive to see it in the options.

If we look at it in terms of shortcuts, consider a Junction Link as the shortcut file, and Destination as the original location.

And consider looking at tutorials to do this for Dropbox, as Google Drive similarly has only a single sync folder.

Oh and I'd avoid juntion points between drives!

-
I tried and GoogleDrive application does not recognize it – Darqer May 4 '12 at 0:52
Did you only try Junction Link Magic? Maybe try Junction Master? Strange, I'll have to go home and try this myself. – Jay May 4 '12 at 0:56
Application can recognize junctions so I think that google does not synchronize with it. – Darqer May 4 '12 at 9:37
@Darqer: just tried JLM and confirmed it doesn't work. Tested Junction Master and it works fine with Gdrive. Updated answer – Jay May 7 '12 at 13:11
@jay - It just occurred to me that the actual files are residing in the Google Drive directory - you move them there from their original location - and then create a hard link (using junctionmaster or otherwise) in the original location to point to the directory under the Google Drive. I thought it was the other way around which is why I couldn't get it working. Any idea why putting the hard link inside the Google Drive which points to the directory in it's original location? – Howiecamp Sep 29 '12 at 2:02

You could drag the actual folder to the Google Drive folder. Then create a shortcut to it where you originally had the folder.

-

I have significant experience with Junction Points and Symlinks and note the following results:

• Junctions & SymLinks inside the Google Drive directory did NOT sync

• Hardlinks offered no direct solution

• Moving the actual director to the Google Drive and creating the Junction from the ORIGINAL location TO the NEW (Google Drive) location DID sync (probably this would work for SymLinks as well)

Also: I have seen a problem with having junctions cross (LOCAL) drive boundaries (C: -> F:) and have done this extensively over the years). SymLinks are required to cross MACHINE boundaries (C: -> NetworkShare).

It's a PITA to move the directory and then link (and feels 'unnatural') it but it works fine that way.

-

insync application for Windows, Mac and Linux supports aliases, shortcuts and ntfs junctions

Download from insynchq.com for 2 week trial, then 10\$ one-off payment thereafter.

NOTE: I do NOT work for them

-

From the Command Prompt:

mklink /J "C:\Users\<username>\Google Drive\<folder>" C:\path\to\folder

-
Other answers have said that this doesn't work. Can you please explain why you think it does? – DavidPostill Jul 11 '15 at 22:54
It worked for me, and none of the other information in the other answer that mentioned this was useful. Maybe Google Drive has changed in recent times, but I had no issues whatsoever with this single command. – hughes Jul 12 '15 at 21:05
This worked for me; It may take a while to get around to syncing your files so be patient before giving up. – ctbrown Aug 7 '15 at 11:53
The problem with this approach is that it will only work at the link creation time. At that moment, all the files inside the linked folder will be synchronized to the online folder, but if later on you go into the local folder and add a file in it, it won't be synchronized to the online folder. However, if you make changes to the online folder, they will be reflected to the local folder too anytime. I could also observe that when you try to add files to the local folder after making the link, they will keep the "refreshing" icon forever. Can anyone confirm this? – jj_ Apr 13 at 5:35
@jj_ I will check this. I just tried it and had some problems. I created a link, but noticed I made a mistake with the location, providing an incorrect location. I had to delete and try this command multiple times after that before it actually started to work. Now I will check to see if it will actually sync when changing a file. – davejal Apr 14 at 13:05

Here are the steps you should follow.

1. Temporarily remove data from the existing folder you want to use. In my case I have a folder located at C:\Users\user\Documents Synchronize that I use for data synced to the "cloud". I removed data from that folder and put it somewhere else temporarily.

2. Create the symlink Run Command Prompt as Administrator and then create the symlink. My command looked like this:

The quotes are necessary since there is a space in Google Drive. The location I used for the symbolic Google Drive is the default location that the Google Drive installer will use. You can put it wherever you like, but since it is a symbolic link it isn't really going to take up any space, so it doesn't matter. The /J switch makes it a hard link. (C:\Users\"your username"\Google Drive is the default location for Google Drive)

1. Install and configure Google Drive You can just use the default configuration unless you created the symlink folder in a weird location.

2. Move data back to your existing folder I put my data back in C:\Users\user\Documents Synchronize and it immediately started to sync to my Google Drive in the "cloud".

3. Hurray!

-
/J switch creates a directory junction, not a hard link – fnt Dec 18 '14 at 0:07

using the /d parameter with mklink on windows worked very well for me

cd %userprofile%\Google Drive


-
The problem with this approach is that it will only work at the link creation time. At that moment, all the files inside the linked folder will be synchronized to the online folder, but if later on you go into that folder and add a file in it, it won't be synchronized to the online forlder. However, if you make changes to the online folder, they will be reflected on the local folder too. So basically it's only synchronized at creation time and then it's only one way. – jj_ Apr 13 at 5:10

-

Using mklink worked fine for me on Windows 10. Be sure to run CMD as Administrator.

C:\WINDOWS\system32>mklink /j "C:\Users\James\Google Drive\MyFolder" "C:\Users\James\Documents\MyFolder"

Junction created for C:\Users\James\Google Drive\MyFolder<<===>> C:\Users\James\Documents\MyFolder


Blog Source

-

protected by Community♦Jul 23 '15 at 16:49

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).