|
Answer» Hi, i have to run some PROGRAM that gives an OUTPUT (0 or 1). I wonder if I can somehow push this value into variable, so I can do IF GOT on next row.
Thank you, PeterIt depends if the 1 or 0 is a return code or generated data from the program.
You can try this but it only works for return codes.
Code: [Select] @echo off someprogram if errorlevel 1 goto A if errorlevel 0 goto B
Return codes should be checked in descending value, the compare is actually equal to or greater than.
If the 1 or 0 is generated program data, try REDIRECTING the output or using the pipe to capture the value.
Hope this helps. Unfortunately it is generated data.
And I have no access to the program.OK. I'm CONFUSED. You have a one or zero. Where? In a file? Floating in space? What program generated this single byte and how did you get it?
This is great. I get to ask the questions. Nice change of PACE.
|