Kristof posted on October 15, 2008 19:35

Dropbox, a simple and convenient tool to synchronize files between two or more computers, recently made it into Lifehacker's Five Best File Syncing Tools. According to the article, Dropbox's biggest drawback is that you can't define sync folders, so you have to move everything you want to sync to the main Dropbox folder.

However, if you have administrative rights on your computers, and are not afraid of using command line, there's actually a very simple way to work around this limitation by using junctions. In this example, I will create a Test folder in My Dropbox that will be linked to C:\Users\Kristof\Temp folder:

  1. Download Junction tool from SysInternals, unpack it and place junction.exe into Windows's System32 folder.
  2. Close Dropbox on all of your computers, so it won't interfere while you tinker with dropbox folder.
  3. On each of your computers, do the following steps:
    1. Open command line prompt (in administrator mode if working on Vista).
      Open command prompt
    2. Change folder to your dropbox folder (1):
      cd "C:\Users\Kristof\Documents\My Dropbox\"
    3. Create a junction to the folder, you'd like to sync (2).
      junction Test "C:\Users\Kristof\Temp"
    4. You may check with dir command (3), that your new junctioned folder links to your folder (4).
      Junction commands
  4. Start Dropbox on all of your computers.

It is required that the symbolic name you use for junction folder in dropbox (in my case Test) is the same on all computers, but the destination folder (in my case C:\Users\Kristof\Temp) may be different on each computer.

You may repeat this procedure for as many folders as you like.


Where is My Dropbox folder?
When installing Dropbox, you may specify where to put your dropbox folder. If not, the defaults are:

  • C:\Documents and Settings\Username\Documents\My Dropbox on Windows XP or
  • C:\Users\Username\Documents\My Dropbox on Windows Vista

Can I delete junctioned folder, when I no longer need it synchronized?
NO! If you decide to stop synchronizing a folder, you MUST perform reverse steps to un-junction the folder:

  • Stop Dropbox on all of your computers.
  • On each of your computers, open command line, change folder to Dropbox folder and break the junction:
    junction -d Test
  • Start Dropbox on all of your computers.

If you simply delete the junction folder, it will delete it's target directory and all of its content as well!


Calendar

«  March 2010  »
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
View posts in large calendar

Blog search

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Copyright © 1996-2010 Krištof Gajšek