10

I've been reading a lot of information on this and yet I'm still unsure if its possible.

What I want to achieve is: sync a folder that is outside Dropbox and any changed to that folder or the files within get mirrored to the Dropbox folder and the Dropbox server.

This is what I've tried: I've install Link Shell Extension. Picked a folder with 10 pictures inside and created a junction for it inside the Dropbox folder. When I delete a pictures from inside the original folder (outside Dropbox) the change is reflected in the Junction folder inside Dropbox Folder, not on the server.

The exact same behaviour with the Symbolic Link option.

If I manually select Pause Syncing from Dropbox system tray icon and then Resume syncing = it uploads the changes to the server.

I know I can move all my files inside Dropbox folder and create the junctions/symlinks at their original locations but I want to do it the other way around.

Also what is the difference between choosing the Junction and Symbolic Link Option in regards to a folder?

Thank you.

5
  • You may want to add some information on which operating system you are using. It is usually no problem on linux (even with symbolic links even pointing to a NTFS partition). It can however fail under some circumstances, for example I could not use it for syncing a folder in the AFS.
    – Tim
    Commented Oct 17, 2013 at 13:06
  • Windows 7 Professional x64 on a NTFS Partition. Dropbox is installed on D:/Dropbox as opposed to its default installation folder in C:/ Commented Oct 17, 2013 at 14:04
  • See dropboxwiki.com/tips-and-tricks/sync-other-folders
    – Vadzim
    Commented Jul 22, 2016 at 12:11
  • The dropbox wiki has been abandoned and I couldn't find the relevant article in the webarchive.
    – rossmcm
    Commented Oct 17, 2019 at 1:12
  • help.dropbox.com/installs-integrations/sync-uploads/symlinks states: As of mid-2019, Dropbox no longer follows items outside of your Dropbox account that are linked to by a symlink.
    – sherdim
    Commented Oct 30, 2019 at 9:03

4 Answers 4

10

According to DropBox (https://www.dropbox.com/help/145/en)

Junction points and aliases

Dropbox will follow Windows junction points (Windows Vista or later) and sync the files or folders they link to. However, any changes to those files or folders made from the Windows operating system will not sync again until the Dropbox desktop application is restarted. To get around this, move the original folder to your Dropbox and add a junction point from its previous location to link to its new location in the Dropbox folder.

2
  • 2
    The other approach is to move your folder inside dropbox and then create a symlink at the old location and points to the dropbox location. Since dropbox is source folder, it will sync perfectly since there is no symlink issues dropbox has to work with. Use case would be moving your documents and desktop folders and point it to inside DropBox.
    – Sun
    Commented Oct 20, 2014 at 16:45
  • I'm having trouble finding guides on how to do this. I don't want to go messing around with my C:\Users\ME\Documents folder unless I have some tips on how to avoid catastrophe. Can anyone provide a useful link?
    – tomfumb
    Commented Nov 30, 2014 at 4:37
3

Symbolic links and juntions don't really work for this. But you can use something else to achieve what you want.

My app Boxifier (http://www.boxifier.com) can sync folders outside of your Dropbox folder without moving or copying them to your local Dropbox folder. You don't need to create any symbolic links or junctions.

Just right-click a folder in order to sync it.

Your photos will start syncing and any changes you make to that folder will be mirrored to Dropbox.

enter image description here

1

Unfortunately, at least until a change is made from the Dropbox Dev Team, symlinks will not sync anymore.

I just had a chat with Dropbox support about junctions not syncing (Dropbox Windows version: 89.4.278) and their answer was:

We implemented a fix in a new version of the Dropbox desktop application that means that symlinks are now synced as individual symlink files, and we no longer sync the files referenced by the symlink if they are outside of the Dropbox folder.

As mentioned by the OP, manually selecting "Pause Syncing" and then"Resume syncing" in the desktop app had the effect of uploading the changes to the server. Now, with the changes in the app, this does not sync anymore. The existing files on the web were not deleted, but the changes are not syncing anymore.

In my opinion, this is a bad decision from Dropbox Team.

0

For a more advanced but better solution you can combine a rsync powered cygwin installation with a init batch script calling a cygwin shell script that would trigger - whenever scripted - a synchronization of the synchronized with the trusted 3rd party cloud storage folder with the contents lying in the watched folder.

(1.) Install cygwin following this link. Beware to select rsync in the list of packages to select. If you miss it you can safely rerun this installer whenever you want. Whenever you need another package in the future.

(2.) After you move around in cygwin getting a basic understanding of the environment, edit sync.sh whenever you want (you may later move it to a better location).

sync.sh contents:

#!/usr/bin/env bash
#   The synchronized folders.
WATCHED_FOLDER=/cygdrive/DRIVE_LETTER/PATH/TO/WATCHED/FOLDER
SYNCED_FOLDER=/cygdrive/DRIVE_LETTER/PATH/TO/SYNCED/FOLDER
#   Will run forever!
until false
do
  #   Do a single remote synchronization
  rsync -avn --delete WATCHED_FOLDER SYNCED_FOLDER
  #   Wait five minutes before resyncing.
  sleep 300
done

(3.) Do some testing with manual calls to sync.sh from cygwin. Watch the results. Change some folders and files and rerun. Watch again. Repeat.

(4.). Once you are satisfied with the results, turn -avn to -av to deactivate the dry running at your own risk. From this point changes will be run effectively with no Microsoft thrashbin support.

(5.) Go start->programs->start->[mouse right click]->open->new->file.

(6.) Name the file sync.bat or something.

(7.) Edit sync.bat and Cygwin's ~/.bashrc:

sync.bat contents:

rem   call the synchronization neverending script.
DRIVE_LETTER:\PATH\TO\CYGWIN\Cygwin.bat

~/.bashrc contents (this is the hard thing to do, because you need to edit it with vi from Cygwin, but you can most probably work this around by editing from Microsoft the file DRIVE_LETTER:\PATH\TO\CYGWIN\home\YOUR_USER_NAME.bashrc:

[...]
/cygdrive/DRIVE_LETTER/PATH/TO/sync.sh
[...]

That is a line that would call the infinite syncing loop. That is not the truly way of doing this kind of thing, but should be just OK for now.

(8.) Reboot

(9.) Check with taskmgr.exe or the Microsoft Task Manager that there is a bash.exe running. If you did not start cygwin yet, that should be the process doing the synchronization.

(10.) As optional future steps you may want to daemonize the process in any way. There may be many possibilities here.

This may be a hard walkthrough but there are a lot of community support in the Internet for all the stages.

Many other ways of doing may exist. For example you can autostart a GNU/Linux virtual machine that would do all of this without Cygwin. This would need you to share the watched and synced folders over the local network, better a private network between your host and the virtual machine only, and then mounting the folders from GNU/Linux using the cifs-utils, samba and smbclient packages. Many of the shown stages will apply the same to this other methodology of giving UNIX shell capabilities to your Microsoft host.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .