To compare to files in dos
Hi All,
I want to compare to 2 file(.txt) in dos prompt. suppose i have files- output1.txt and output2.txt in d:\ drive
If i compare this two files i want some output
===============================================
if they match result should be "They matach"
if not matach then "They do not matach"
Signature · 2 lines
View this message in context: http://www.nabble.com/To-compare-to-files-in-dos-tp20627871p20627871.html Sent from the linux-msdos mailing list archive at Nabble.com.
Quoted 7 lines · On Fri, 21 Nov 2008 11:19:05 -0800 (PST) Dos_Neo <[email protected]> wrote:
I want to compare to 2 file(.txt) in dos prompt. suppose i have files- output1.txt and output2.txt in d:\ drive
If i compare this two files i want some output
===============================================
if they match result should be "They matach"
if not matach then "They do not matach"
You can easily do this with a small batch file and the cmp command.
cmp will provide you with an errorlevel that you can check and print anything you want from your batch file.
Signature · 2 lines
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com