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?
How can I command compare files and folders DOS?
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.
-
/D, the default setting, displays the differences in numbers.
-
/A displays the differences in ASCII.
-
/L displays the differences in the number of lines.
-
/N compares the first N lines of each file.
-
/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"
-
/A displays the first and last lines.
-
/B compares in binary.
-
/C does non-case sensitive comparison of text.
-
/L compares files as ASCII.
-
/LBn sets the maximum number of consecutive mismatched lines.
-
/N is the number of lines, in ASCII, compared.
-
/T does not convert tabs in to spaces.
-
/W compresses tabs and spaces.
-
/nnnn sets the number of consecutive matching lines after a mismatch.