Created
January 26, 2018 14:10
-
-
Save pavelburov/4dd76f12ef2d08c401bf54ec344efae9 to your computer and use it in GitHub Desktop.
windows batch (bat, cmd) - How to set command output to variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %%i in ('application arg0 arg1') do set VARIABLE=%%i | |
echo %VARIABLE% |
Double percent is for scripts and single is for command line
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't how it ran successfully in your side the correct syntax is:
for /f %i in ('findstr /r "[0-9]" hotfix.tt') do set VARIABLE=%i