How can I command compare files and folders DOS?

Asked By 10 points N/A Posted on -
qa-featured

I want to transfer many files from multiple computers to a single one and I want to check that everything is done successfully. 

Is there any simply DOS command to compare the files?

SHARE
Answered By 0 points N/A #146331

How can I command compare files and folders DOS?

qa-featured

You can use either the COMP or FC command. Both commands compare two files or directories, and display the differences between them.

For COMP, the syntax is: "COMP [data1] [data2] [/D] [/A] [/L] [/N] [/C]."

The use of wild cards in data1 and data2 allows the comparison between sets of files and folders.

  1. /D, the default setting, displays the differences in numbers.
  2. /A displays the differences in ASCII.
  3. /L displays the differences in the number of lines.
  4. /N compares the first N lines of each file.
  5. /C does non-case sensitive comparison of text.

For FC, the syntax is: "FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:][path1]filename1 [drive2:][path2]filename2" and "FC /B [drive1:][path1]filename1 [drive2:][path2]filename2"

  1. /A displays the first and last lines.
  2. /B compares in binary.
  3. /C does non-case sensitive comparison of text.
  4. /L compares files as ASCII.
  5. /LBn sets the maximum number of consecutive mismatched lines.
  6. /N is the number of lines, in ASCII, compared.
  7. /T does not convert tabs in to spaces.
  8. /W compresses tabs and spaces.
  9. /nnnn sets the number of consecutive matching lines after a mismatch.

Related Questions