1.

Solve : Compare two files?

Answer»

I am LOOKING for a command that will allow me to COMPARE the contents of two simple files and return a binary-type response (yes/no, positive/negative, 0/1, something like that).

Ideally, something like this

C:\[*compare*] $temp1$ $temp2$

where the output/return is:

1 (or 0)

Thanks!
-Darrylfcomp.bat

echo off
set same=0
fc %1 %2>nul&&set same=1
echo %same%

fcomp file1 file2
fcomp "file one" "file two"

echoes 1 to STDOUT if files are identical, echoes 0 if they are not.



Discussion

No Comment Found