CMD DOS How to compare two files in command line and
suppress prompt
This example uses DOS “COMP” to make a comparison of two
text files and return:
1.
Matches = Files compare OK
2.
Difference(s) found = Files are different sizes.
This example pipes in an “N” for no to the prompt
C:\TestComp>echo N | comp
File1.txt File2.txt
Comparing File1.txt and
File2.txt...
Files compare OK
Compare more files (Y/N) ?
C:\TestComp>echo N | comp
File1.txt File2.txt
Comparing File1.txt and
File2.txt...
Files are different sizes.
Compare more files (Y/N) ?
C:\TestComp>
|
No comments:
Post a Comment