Tuesday, 27 August 2013

pass the output of a batch file into a for loop

pass the output of a batch file into a for loop

I am trying to pass the output of a process into a for loop by using pipes
type %1% | findstr /R /V "Test" | for /F "tokens=*" %%i IN ('more') DO
@echo %%i
but I do not know what to put in place of ('more') so that it reads the
output from the findstr command. Is this even possible? Or do I have to
save the output to a file and then read in the file in an entirely
different batch program? Please help.

No comments:

Post a Comment