How to synchronise directories outside “Google Drive” and Dropbox folders – NTFS junction point

I have come across this issue while I was working on a project and at some point decided to sync my project folder on cloud. I already have cloud accounts with Google and Dropbox but unfortunately both work with default folders i.e. “Google Drive” and “Dropbox” respectively. It was absolutely not convenient for me to put my project folder in either of them. Specially when I wanted to sync my folder with both.

Then I google it to find out the solution to my problem. I have come across the term “NTFS Junction Point” which I never heard of before. After a little bit of research it sounded like the solution to my problem.

“An NTFS junction point is a feature of the NTFS file system that provides the ability to create a symbolic link to a directory which then functions as an alias of that directory. This has many benefits over aWindows shell shortcut (.lnk) file, such as allowing access to files within the directory via Windows Explorer, the Command Prompt, etc.”

well, to be honest I copied this definition from wikipedia so if you want to know more about it then click here.

Also the documentation about “mklink” (the command to create junction point) can be found here. This blog is to share the difficulties I came across due to the poor documentation about the use of these commands.

The command to create a junction point as stated on MS website is as follows:

mklink [/j] <Link> <Target>

where <link> is the junction point and the <target> is the original folder that is to be synchronised with Google or Dropbox.

There are couple of points which are very important to consider while creating a junction point. Let’s start with the basic one:

  1. Do not forget to use double quotes when <Link> or <Target> path contains spaces e.g. mklink /j “c:\dropbox\link folder” “c:\projects\target folder”
  2. make sure the “link folder” that you specified in the command does not already exist otherwise you will come across the error message “Cannot create a file when that file already exists”. This means mklink command will automatically create the “link folder” for you and will throw an exception if the folder already exists. Again “link folder” was non-existent and created by mklink command while “target folder” was the original folder with files and sub-folders in it.

NOTE: This workaround was tested only against Dropbox. GoogleDrive is included only on the basis of mere assumptions.

Hope this makes sense to you …. and if not then I don’t mind you to help me improving it 😉

Advertisements
This entry was posted in NTFS File System and tagged . Bookmark the permalink.

12 Responses to How to synchronise directories outside “Google Drive” and Dropbox folders – NTFS junction point

  1. SteveC says:

    HI-thanks for posting this info. I tried this with my google drive. The mklink command worked well. The folder now shows up in my Google Drive folder. The syncing, however, doesn’t appear to work. It has the double-arrow syncing symbol on it like it is trying to sync, but in never shows up on the cloud. Any chance you have an update that might help? Thanks

    • shigarr says:

      Hi Steve, is your target folder is on the same drive as of “google drive” folder? It looks like google drive doesn’t pick up a junction link which is pointing to a folder on a different drive. I just created a temp folder on the same drive as of Google drive and it successfully sync. I initially used Junction link for dropbox and it works perfectly well for dropbox and assumed it should work for any other software too i.e. Google Drive and Sky Drive. I will look into this issue a bit further and update my blog accordingly but in the meanwhile if you come across any useful solution then do share with us, please.

      • SteveC says:

        Hi Shigarr. Thanks for the quick reply. Yes, I did use a directory on the same drive as my google drive directory. I just tried it again using the mklink syntax that you provided on a second computer with the same results. It shows the double arrow like it is trying to sync, but it never does. I will keep looking for options and let you know if I come across something.
        Thanks
        Steve

      • shigarr says:

        much appreciated Steve, thanks!

  2. bingo says:

    Fantastic publish, very informative. I wonder why the opposite specialists of this sector do not notice this. You should continue your writing. I’m sure, you’ve a great readers’ base already!|What’s Taking place i’m new to this, I stumbled upon this I have found It absolutely useful and it has helped me out loads. I hope to give a contribution & aid different users like its helped me. Great job.

  3. Broken Arrow says:

    I think directory junctions are ignored by Google Driver Synchronizer.

  4. J M Ward says:

    Unfortunately, Broken Arrow is right. Unlike other synchronisation folders, the Google Drive is a special system folder which takes no notice of symbolic links. It doesn’t even show up in the command prompt window unless you do: DIR /A:S, so its system configuration is meant to be hidden. I’ve tried all sorts of ways around this, but Google has me beat!

  5. shigarr says:

    I think Cubby by logmein is answer to our questions. It keeps your existing file structure in tact. You can sync any folder with the cloud without needing to change your folder structure. I haven’t tried it myself yet but it sounds promising. You can find more information about it here https://www.cubby.com/howitworks/

  6. J M Ward says:

    Along with Cubby, there is SugarSync (5 GB free), which I think is the simplest to use for folder synchronisation – so much so that I have paid for a full account. Also good is iDriveSync (10 GB free), with its “Out of Box”, and 4Sync (15 GB free!). These all also have good upload speeds from the UK, which is of course very important for getting folders into the cloud in the first place. I’ve tried Cubby but it doesn’t seem as fast from here.

  7. Herr Doktor says:

    Here’s the work around for Google Drive. Slightly different than for Dropbox. @SteveC @JMWard

    http://www.online-tech-tips.com/computer-tips/sync-any-folder-with-google-drive-skydrive-and-dropbox/

  8. LWC says:

    Dear shigarr, you said you’d update your blog about Google Drive not supporting this…but you didn’t.
    As for dropbox, just wondering – why did you use “NTFS junction point” (“mklink /j”) instead of “NTFS Symbolic Link” (“mklink /d”)?

    • shigarr says:

      Apologies LWC, I haven’t had a chance to work on this issue. I would reckon you to look into the suggestions made by J M Ward. World has moved on so does Google. They should make things a bit flexible in this day and age.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s