Categories
Windows

Link Two Folders for Data Synchronization in Windows

In some cases, you need two folders in your PC to be synchronized to each other, example synchronize data between folders in your dropbox to local PC in order to save your time in copy it back or some other cases.

Here I would like to show a simple way to use in Windows 7 or 8 with command of mklink

Problem

Your original data is in drive D:/temp/share/toShare
You want to synchronize it to folder in drive C:/temp/myShared

Solution

The solution need to use Windows command from DOS Prompt.
Make sure that you have backup all of your data in drive C: to drive D: in order to synchronize back from drive D: as original source.

  • Start your DOS prompt as Administrator
  • Type following command <mklink /D “target” “source”>
mklink /D "C:\temp\myShared" "D:\temp\share\toShare"

symbolic-link-folders-dos-prompt-osify

You could see the successful message as:

symbolic link created for C:\temp\myShared <<===>> D:\temp\share\toShare

Now both folders are linked to each other, if drop a file to one folder, another one also has it and the same for delete or update.

symbolic-link-folders-osify

How to delete the symbolic link

BE CAREFUL!
Simply by delete the target destination folder and not the source folder.
In my case, my destination folder that I linked is in drive C: so I just need to delete the folder:
C:/temp/myShared

2 replies on “Link Two Folders for Data Synchronization in Windows”

One use case example as I always perform:

you want to make sync. your Pidgin account between computer using dropbox

  • Copy your original pidgin profile folder .purple from your PC profile to Dropbox
  • Remove the folder .purple from your PC user profile
  • Open DOS prompt as Administration
  • Type following command


    mklink /D "C:\Users\PC_USER\AppData\Roaming\.purple" "D:\Dropbox\.purple"

You will get your Pidgin profile sync. across any machine you by above simple solution.

You can do same thing for other cases such as on Firefox or Thunderbird profile.

Please share your use case.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.