How can I compare two files in a batch file, and perform an action based on whether or not they match? I\'ve tried something like:
if file1.txt NEQ file2.txt got
I believe you can use the "FC" command and then check the errorlevel. Here's some code:
@echo off
:main
fc c:\filename r:\filemame > nul
if errorlevel 1 goto error
:next
echo insert next CD
pause
goto main
:error
echo failed check
(Pulled from http://www.computing.net/answers/dos/batch-file-command/15753.html)