Showing results for September 9, 2005 - The Old New Thing

Sep 9, 2005
Post comments count0
Post likes count0

Reading the output of a command from batch

Raymond Chen
Raymond Chen

The FOR command has become the batch language's looping construct. If you ask for help via FOR /? you can see all the ways it has become overloaded. For example, you can read the output of a command by using the for command. FOR /F "tokens=*" %i IN ('ver') DO echo %i The /F switch in conjunction with the single quotation marks indicates that t...

Code