Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a file copy utility that allows me to control what files and directories are to be copied specifying rules like:

IF source-file-date IS GREATER THAN target-file-date THEN overwrite
IF source-file-size IS EQUAL TO target-file-size THEN skip

The FTP client I use (CuteFTP Pro) has that feature (you can define a set of rules that controls the file uploading process).

But as far as file copy utilities, I havent found one that let me do this. So far, I've tried Robocopy and RichCopy but none of them let me fine-control the copy operation.

In general terms, I need to synchronize two directory trees, i.e. copy the new or modified files from the source tree to the target tree and delete the files in the target tree that dont exist in the source tree.

However, I need to fine control the operation like this:

  • If a directory in the target tree is not present in the source tree, then leave that directory untouched (dont even enter in that directory)
  • if a file in the source tree has the same size as the file in the target tree then dont copy that file, no matter if it's older or newer.

Plus I'd like to control the logging. Robocopy and RichCopy let you control which operations are logged and which ones are not, but they have the same limitations as with he copy operation, i.e. they dont let you fine-control the logging opration either, they just provide some basic functionality.

Do you know if there is such a copy utility that let me do this in Windows??

share|improve this question
Robocopy has options to only copy changed files, and changed includes different filesize. – Richard Jun 2 '09 at 13:30

rsync kind of does that, and I have used it successfully on windows as well.

share|improve this answer
Seems to be UNIX-only? – Kara Marfia Jun 2 '09 at 13:17
Actually, you have a few options for running it on windows as well. See the post of skitzot for one – Vincent De Baere Jun 2 '09 at 14:12
Rsync under Windows works very well. One issue with rsync on Windows, however, is the lack of ability to synchronize ACLs. If you need that, you'll either need to code something up yourself or use a third-party synchronization utility. – Evan Anderson Jun 2 '09 at 23:40

Have you considered writing your own using VBScript? It sounds hard but it isn't really, and it would give you as fine control as you want.


share|improve this answer
Actually, I have. But I thought I'd ask here first in case anyone knows a solution already. – GetFree Jun 2 '09 at 10:53

I think that smartsync ( gives you that kind of control. You might also try allwaysync ( the final product I have used is syncback SE but I don't think it gives you exactly what you are looking for.

share|improve this answer

Might wanna check out Cobian Backup [][1] It's OpenSource and Free and might meet all your needs.

As for Rysnc, [][1] I've used cwRsync before with much success via SSH.

share|improve this answer

Take a look and try unison: Download for Windows

share|improve this answer

Microsoft has a utility called SyncToy that allows you to choose various options, such as sync, echo, etc.

I use it to backup all my photos from my laptop to my media PC.

share|improve this answer

have you looked at all the options available with robocopy? there are options available for dealing with timestamps and file sizes, as well as empty directories...

link below has a pretty comprehensive list of parameters available for robocopy (these work with windows 7 as well).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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