5

Every time I use the Windows comp command, a message containing:

Compare more files (Y/N) ? 

is shown. Can I avoid it by typing N by default?

thanks

2 Answers 2

11

You can pipe an N in there:

echo N | comp file1.txt file2.txt
1
  • 1
    +1 - It will still show the Compare more files (Y/N)? prompt, but it will also be answered with 'N'. Jan 22, 2013 at 14:34
4

You could also consider using another, also built-in, command, FC. It can perform binary comparison (you need to specify the /B switch: FC /B file1 file2), which seems closer to what COMP does, although the results are still displayed in a different format.

Anyway, it doesn't prompt you for more files to compare, it just does the job and terminates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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