List line count of multiple files in windows server 2012

how to find out line count ( wc -l ) for multiple fines in windows cmd

the command which i a using to find line count for single file is

type sec0001.txt | find /c /v ""

but how to use it for multiple files

to get output filewise as if this command is run like

type sec*.txt | find /c /v ""

its gives output for summation all files

the desired output which i expect is

thanks

Try using a FOR loop:

FOR %i IN (sec*.txt) DO find %i /c /v ""
1 Like

Thanks it works for me

I would like to know can we get file size also in same command
like