|Is it possible to pipe multiple commands in a for statement?|
For instance, I am trying to get the number of lines in a file assigned to a variable. There might be another way to go about this but my focus of this question is on whether it is possible to pipe multiple commands and then on a better approach for the line number to variable.
for /f "tokens=* delims= " %%a in ('findstr /R /N "^" %FILE% |find.exe /v /c "" ^') do (set var=%%a)
Whenever I try anything similar to the above, I get an error, '| was unexpected at this time".
Does anyone know if this is possible?