I have a piece of code that is meant to send the following to the linux command line:
wc -l C:/inputdirectory/P*
However, I need
Use the following batch file (CountLines.cmd):
@echo off
Setlocal EnableDelayedExpansion
for /f "usebackq" %%a in (`dir /b %1`) do (
for /f "usebackq" %%b in (`type %%a ^| find "" /v /c`) do (
set /a lines += %%b
)
)
echo %lines%
endlocal
Usage:
CountLines C:/inputdirectory/P*