Batch
Created: 2016-01-02 20:25:33 -0800 Modified: 2019-01-22 09:04:21 -0800
Call an external program and check the errorlevel (reference)
Section titled Call an external program and check the errorlevel (reference)Get output of an arbitrary program in a variable (reference)
Section titled Get output of an arbitrary program in a variable (reference)(note: in Bash, this would be like output=program.exe
or output=$(program.exe))
for /f i
I think that if you’re doing this on the command line, you only need one percent sign.
Take user input and store it in a variable
Section titled Take user input and store it in a variable1/2/2016
- set /p variable_to_store=“Prompt? [y/n] ”
- echo %variable_to_store%
- If you want no prompt, just do
- set /p variable=