GouthamAnand
asked on
How do I get the total number of lines of all the files in a directory ?
Hi,
How do I get the total number of lines of all the files in a directory ? - in DOS command prompt?
if there are 3 files , say a.txt, b.txt and c.txt each having 30 lines. Then I want to see the total 90. Do we have any command to do this?
Also how do I get the total no of lines of a specified file - in DOS command prompt?
How do I get the total number of lines of all the files in a directory ? - in DOS command prompt?
if there are 3 files , say a.txt, b.txt and c.txt each having 30 lines. Then I want to see the total 90. Do we have any command to do this?
Also how do I get the total no of lines of a specified file - in DOS command prompt?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, I concentrated too much on your examples in my first attempt; I already changed the script to now support folders as well. Please copy it again from above.
ASKER
Thanks a lot. But I have one more constraint - I want to include only certain types of files like *.txt or .sql to take into consideration in that directory.
Can you please suggest me now.
Can you please suggest me now.
Just call it like in my example above: Whatever.cmd "S:\ome\folder\*.txt" or Whatever.cmd "S:\ome\folder\*.sql"
ASKER
Thanks a lot.
ASKER
Please suggest me now.