Is it possible to set a statement\'s output of a batch file to a variable, for example:
findstr testing > %VARIABLE% echo %VARIABLE%
in a single line:
FOR /F "tokens=*" %%g IN ('*your command*') do (SET VAR=%%g)
the command output will be set in %g then in VAR.
More informations: https://ss64.com/nt/for_cmd.html