Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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.

share|improve this question

closed as off-topic by random May 14 at 22:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – random
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 7 down vote accepted

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.

share|improve this answer
1  
+1 for Robocopy – Mokubai Jul 5 '10 at 9:26
    
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.

share|improve this answer

Get rsync for Windows.

share|improve this answer

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