Use symbolic links with Dropbox
mklink /D “%userprofile%DropboxDocuments” “%userprofile%Documents”sports74.ru
I love using Dropbox but a down side is that I have files and folders outside of Dropbox that I would like to sync in Dropbox without moving them into the Dropbox folder. This is often a the case for users who’s company uses folder redirection to backup company data in a central server. Luckily there is an easy to way to accomplish this. Windows has a built in function since windows vista to create symbolic links. Symbolic links take the idea of shortcuts one step further. Instead of just being a link to something somewhere else on your computer it tricks programs into thinking the files and folders actually reside inside the folder in which they are linked. I will explain how to do this using the built in utility in Windows but there are several third party apps that do this for you using a graphical interface. Don’t be scared this is easy and I explain everything below..Почему одинаковые дома по-разному стоят?
* Update * There is one glitch I should mention with symbolic links and Dropbox you should be aware of. Dropbox will only notice changes during the Dropbox service start up so changes will only be replicated when you login to your computer or when you restart the service. You can write a script to restart the Dropbox service automatic every 1/2 hour or so as a workaround. If you want to sync your whole My Documents folder and your company isn’t using folder redirection then you can simply move your documents folder into Dropbox and it works 100% (this is the way Dropbox suggests you do it) but if you only want one folder or folders from multiple places on your computer to be in Dropbox then you are stuck using symbolic links. As a reader suggest below if y0u are not using folder redirection another option is to a use the Dropbox folder as your actual location of the files and make the other folders in your computer the symbolic links. This is just reversing the locations as I explain them below.
Symbolic Link Tutorial Starts Here:
In order to run the command you need in Windows 7 you need to open command prompt with elevated privileges. Click the start button and type cmd now right click click “Run as Administrator”.
Now that you have command prompt open you just have to create the link using the command line tool called mklink. In mklink the first path you type in is the path into your dropbox folder where you want this link to be. The second path is where the real folder is located on your computer. Example: mklink /D “C:\UsersUser\Name\Documents\Dropbox\DesiredFolder\Name” “C:\PathToDesiredFolder”
In this real example a symbolic link to my documents folder is created in my dropbox folder. mklink /D “c:\users\matt\documents\dropbox\SLinkDocuments” “c:\users\matt\documents” so now I would have a folder in my dropbox folder called SlinkDocuments that is synced to all my computers and devices and tied to my actual documents folder on my computer.
In this example I use a variable so that anyone can run this same command without changing it and it will create a symbolic link in their Dropbox folder to their Documents folder inside their profile.
mklink /D “%userprofile%\Dropbox\Documents” “%userprofile%\Documents”
How the above example works.