can i have a batch file react to an output from a DOS program? for example, a DOS program run in the batch is comparing two files. if they match it gives a specific text output on screen, and if they dont match it lists the offsets that are different on screen.
can a batch recognise the "they match" text and move to a given command, or if it lists differences then move to a different command?
If it sets an errorlevel, like good 'ol FC, you can use that. If not, you'll have to work with the output verbage.
==================================
@echo off & setLocal EnableDELAYedeXpansionfc one two > nul
goto :!errorlevel!
:0
echo same & goto :eof
:1
echo not same
=====================================
Helping others achieve escape felicityM2
that sounds like almost what i'm after, the command itself is; fc 1.bin 2.bin /b
just as a follow up, using errorlevel worked a treat! many thanks ;)
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |