Question:
DOS Command to Compare 2 Folders?
Marky Bee777
2011-02-02 03:45:53 UTC
Could some one provide me with a DOS Command to Compare the contents of 2 Folders
Three answers:
Chris Z
2011-02-02 04:00:07 UTC
fc or comp



Compares two files or sets of files and displays the differences between them.



FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:][path1]filename1 [drive2:][path2]filename2

FC /B [drive1:][path1]filename1 [drive2:][path2]filename2

/A Displays only first and last lines for each set of differences.

/B Performs a binary comparison.

/C Disregards the case of letters.

/L Compares files as ASCII text.

/LBn Sets the maximum consecutive mismatches to the specified number of lines.

/N Displays the line numbers on an ASCII comparison.

/T Does not expand tabs to spaces.

/W Compresses white space (tabs and spaces) for comparison.

/nnnn Specifies the number of consecutive lines that must match after a mismatch.

[drive1:][path1]filename1 Specifies the first file or set of files to compare.

[drive2:][path2]filename2 Specifies the second file or set of files to compare.[citation needed]



Equivalent to the Unix commands comm, cmp and diff.
?
2016-12-13 11:48:56 UTC
Dos Compare
?
2011-02-02 03:56:32 UTC
Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.



C:\Users\Hugh>comp /?

Compares the contents of two files or sets of files.



COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C] [/OFF[LINE]]



data1 Specifies location and name(s) of first file(s) to compare.

data2 Specifies location and name(s) of second files to compare.

/D Displays differences in decimal format.

/A Displays differences in ASCII characters.

/L Displays line numbers for differences.

/N=number Compares only the first specified number of lines in each file.

/C Disregards case of ASCII letters when comparing files.

/OFF[LINE] Do not skip files with offline attribute set.



To compare sets of files, use wildcards in data1 and data2 parameters.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...