OneWaySynchronize To The Rescue!

31st of August 2022

Recently I required a command-line program to perform a one-way synchronisation, also known as a mirror. For this kind of task, you might think that I'd be spoilt for choice, and you'd be right, except that the destination was a WebDAV server.

I started looking for something suitable, but then I remembered that Windows natively supports WebDAV. I could use the NET USE command to map the WebDAV server to a local drive. I was back in business! I decided to use Robocopy, since it was already included with Windows. Initial testing locally went well, but when I attempted to synchronise with the WebDAV server... Well, if it went well, then I wouldn't be writing this, would I?

The issue was that Robocopy would copy every file, every single time, even if there were no changes. That's not really synchronisation, is it? I did some research and discovered that several other people had experienced similar issues. One solution was to enable the /FFT option, which accounts for the two-second modified time stamp resolution of the FAT file system. That didn't help. Another solution was to use the version of Robocopy included with the Windows Server 2003 Resource Kit Tools. Apparently, the version included with Windows 10 has a bug which causes it to copy unchanged files under certain circumstances.

Luckily, I had the Windows Server 2003 Resource Kit Tools in my software library since Microsoft no longer offers them for download. I extracted Robocopy, which reported itself as version XP010. This version improved the situation significantly, but didn't resolve the issue entirely. There was still one file that was copied every time, regardless if it was unchanged. There was nothing special about the file, not that I could tell anyway. In any case, this kind of unpredictable behaviour wouldn't cut it, so the search for a suitable program continued.


Robocopy XP010: Famous for... uhh... having less bugs than later versions.

The light at the end of the tunnel (and also the sunlight through my window at this stage) came when I stumbled across a program called OneWaySynchronize, which does exactly what it says on the tin, or in this case, in the file name. It's also open source. Needless to say, it worked perfectly! I was surprised that it doesn't allow you to specify a path when excluding a file, but since I didn't need to do that, it wasn't an issue.


It might not have as many options as Robocopy, but it gets the job done!

So, my files are synchronised and I was able to get some sleep. Hopefully this article will help someone in the same situation, or at the very least, make more people aware of OneWaySynchronize. Even if you're not synchronising to WebDAV, it could be useful in other situations.