Friday, December 20, 2013

How To Count Number of Lines in Multiple Files

At work we normally work with large files and I wanted to count a number of lines in multiple files. There are many ways to do this, however the following command did the trick:

findstr /R /N "^" MyText*.TXT | find /C ":"

The above command will count all the number of lines in all text files that starts with "MyText". This command can sometimes take time to execute especially when dealing with large files.

I believe that there are other ways to count numbers of lines in  multiple files. The following links can be very helpful as well:




1 comment: