How to set commands output as a variable in a batch file

Is it possible to set a statement’s output of a batch file to a variable, for example:

findstr testing > %VARIABLE%

echo %VARIABLE%

Leave a Comment