Example:
for /? | if (this stream has word "the" in it) {echo the line with "the"}
I need somehow to analyze the text in the redirected stream.
Example:
for /? | if (this stream has word "the" in it) {echo the line with "the"}
I need somehow to analyze the text in the redirected stream.
http://www.febooti.com/products/command-line-email/batch-files/ms-dos-command-redirection.html
This website has good information on the different types of piping your can do in DOS.
Use pipes, using the vertical bar, "|".
For the example:
Pipe the output of for into find:
for /? | find "the"
First few lines of the output:
command Specifies the command to carry out for each file.
Specifies parameters or switches for the specified command.
To use the FOR command in a batch program, specify %%variable instead
If Command Extensions are enabled, the following additional
forms of the FOR command are supported:
If set contains wildcards, then specifies to match against directory