I'm trying to use the code snippet from --
"File Line Count - Use FIND command to count file lines, store line count into a variable" in a batch file and every time I test it I get an error -- "| was unexpected at this time."
I copied the code directly from this page but it won't work for me. I'm not really a DOS person, but I need to get a small batch program working.
Can anyone tell me why this won't work?
for /f %%a in ('type "%file%"|find "" /v /c') do set /a cnt=%%a
Thanks
help with pipe in batch file
Moderator: DosItHelp
-
- Posts: 25
- Joined: 24 Feb 2009 14:52
- Location: UK
- Contact: