I have an exe that will have Output values as 0/1. EXE is called through a batch file. I want the batch file to run the EXE and write the result. How is this possible? Any help would be appreciated.
I assume that you want to capture the output of the EXE and process this value, and not just print this value. Here's how you can capture the output in a variable:
FOR /F "tokens=*" %%i IN ('%~dp0sometool.exe') DO SET TOOLOUTPUT=%%i
You need the / F extension for the FOR loop.
for /F "tokens=*" %%i in ('call testing.exe') DO echo %%i
exe ? ? , > → .
:
C:\>dir >> dir.txt
dir.
" > " , " → " , .
Source: https://habr.com/ru/post/1785525/More articles:Xcode error while trying to view .xcdatamodel - iosHow to catch and handle errors in Make? - error-handlingCreate a view controller with parameters - objective-cTripleDES Encryption in C # and PHP doesn't work the same (PKCS7, ECB)? - c #С# ASCII GetBytes, как установить, какой символ используется для неузнаваемого преобразования? - c++Blackberry and Facebook Like button (mobile Internet) - mobile-websiteоперация не разрешена - pythonjavamail - was there a store.close () effect in open folders? - imapСоздайте вектор инициализации без хорошего источника случайности - cHow to connect to Amazon MySQL RAD instance via PHP over SSL - phpAll Articles