Is there a Windows command line tool which will just copy changed files from one directory to another? I do not want to compare file dates, but the actual content. Total Commander has such a function in its folder sync but I need a command line version of that.


There are a couple of possibilities:

robocoby /xc | /xn - comes with windows 7 and is on the xp resource kit http://ss64.com/nt/robocopy.html

or robocopy /mon:n |/mon:m

xcopy /d:m-d-y - standard windows utility.

| improve this answer | |
  • robocopy: /XC and /XN do not help me: these options just make robocopy ignore changed or newer files. I want it to just compare the contents of the files and not the change date. Btw. robocopy just compares file sizes, not the actual file content. – desolat Jul 5 '10 at 13:50
  • @desolat: for those particular requirements, I think you need rsync. – David Z Jul 5 '10 at 20:41
  • Robocopy also has the /mir switch, which will mirror two directories. if you need more then as suggested by others, SyncToy has command line capabilities but it doesn't support file deltas. You could also install cygwin cygwin.com and use rsync, you could also use cwsync itefix.no/i2/cwrsync or Unison cis.upenn.edu/~bcpierce/unison – Pulse Jul 6 '10 at 4:55

Microsoft SyncToy 2.1 has a command line interface and can copy from one folder to another, checking file contents.

However, it's not as simple as specifying to the two folders when you run the command. You have a create a "folder pair" either in the GUI or the command line, and then run the command to synchronise that pair.

So if you wanted something to regularly synchronise two folders SyncToy would do, but it won't be as good for one off folder synchronisation tasks.

| improve this answer | |

Get rsync for Windows.

| improve this answer | |

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