How do I keep two folders in the same computer synced with each other?

I have two computers, A and B with two folders A1 and B1 respectively. Since these two computers are on the same network, both the folders are accessible on both the computers, until both computers are powered on.

I have recently had the need of accessing data of B1 on A and A1 on B while B or A are powered off respectively.

Since data on folders, A1 and B1 are of the similar kind in fact updates of each other's files, my need would be satisfied if both the folders are always synced so that the files are readily available on either one of the folders even if one of the other computers is powered off.

I can do this by copying and pasting the updated file on the other folder after every update that I make on the file.

But that's what I wish to avoid as that slows down my workflow. So, how should I do that?

I'm on Windows 10(1607).

Any reply with helping intention is highly solicited.

1

4 Answers

Another suggestion would be to use robocopy's mirror option. You would write the following batch file and then set the batch to run every minute in task scheduler. It will rerun a sync on the directories every 1 minute.

Robocopy Syntax robocopy [options] In our case you will want to use the /MIR and the /E switch which will mirror all files and subfolders. It would look like this:

robocopy \\computerA\FolderA \\computerB\FolderB /E /MIR

and save as a .bat file. You can then schedule this to run in task scheduler as often as you'd like the directories to sync.

For more documentation on robocopy:

1

Microsoft SyncToy combined with Task Scheduler will do exactly what you are asking:

4

I have a trusted source in How-To Geek if you like their method.

  1. Map the network drive.
  2. Right click a file or folder.
  3. Select "Always available offline".
  4. Schedule sync jobs by going to Sync Center, clicking "Schedule", and setting a timing.

Refer to the linked guide if you can't get it working with just the instructions I have provided.

1

Since you do not need FTP, you can use ViceVersa

It's a free tool which allows 1-way or 2-way file sync between any 2 locations that can be accessed via Windows Explorer. That is to say, it cannot be used for FTP, but can be used between any two locations on the same computer, or same network, including bluetooth, external drives, etc.

This software allows checksum comparison, or date, or size. You can set it up to auto synch 2 locations in the background anytime it detects a change. It uses a database to track file/directory changes between locations (which is important for certain use cases).

You can also use WinSCP, which has the added feature of being an FTP client, so if you need to synch with a remote server, you could.
In addition to syncing entire files/directories, it also allows you to synch just the time stamps of files of the same name and size. It may not do this for the directories themselves, however.
Beware, though, that WinSCP will NOT do a byte-byte (checksum) comparison when comparing any files between source and destination directories. You can choose to compare via timestamp and/or file size. This means, for example, that it cannot correctly determine if say a config file or htaccess file is the same or different between your dev server and live server, if they are the same size, but include a different url inside the file.
Annoyingly, when using the "directory compare" option (that highlights differences between the currently displayed local and remote directories):

  • 1) files of the same name are not aligned (ie it will not show a blank line when the corresponding file/directory does NOT exist in that location)
  • 2) while it highlights "missing" files, it will NOT highlight missing directories ! IMHO, that severely limits the usefulness of this tool.

When you do want to see a full (recursive) file and directory sync preview, it may take quite some time, like 10min or more, so that may be a good time to get a beverage refill or check your social media/email :-)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like