5

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
    You can mount the computer as a network location using Samba or Windows Workgroups/Homegroups.. you might be able to write a batch file that automatically syncs these directories. You could also use cloud-hosted repositories. – var firstName Jun 30 '17 at 14:04
6

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: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

| improve this answer | |
2

Microsoft SyncToy combined with Task Scheduler will do exactly what you are asking: https://www.microsoft.com/en-us/download/details.aspx?id=15155

| improve this answer | |
  • 1
    It's not necessary to install new programs to achieve what OP wants. Try to find something within the operating system before suggesting third-party programs (not sure if that is considered third party or not because it's Microsoft) in the future, please. – var firstName Jun 30 '17 at 15:33
  • @Ramhound yes it does. Map the network drive, right click a folder, click Always available offline, and do the same on the other computer – var firstName Jun 30 '17 at 19:04
  • SyncToy does not list Windows 10 in System Requirements. It only goes up to Windows 7. – SherylHohman Jul 27 '19 at 22:15
  • SyncToy is getting long in the tooth, but it still works on Windows 10, here is a tutorial on how to install it on Windows 10: windowsreport.com/synctoy-windows-10 – Ruben Vega Aug 14 '19 at 18:21
1

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.

| improve this answer | |
  • 1
    OP asked about two folders on the same computer. – abalter Jul 16 '19 at 14:55
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 :-)

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.