Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a windows 7 machine, I'd like a quick way to determine the number of lines in all of the files in a directory tree, for files of a given extension. Is there any good out of the box way to do this?

share|improve this question

migrated from Oct 12 '11 at 17:53

This question came from our site for system and network administrators.

[Do you know a similar program for wc (unix word count command) on Windows?][1] [1]:… – sinping Oct 12 '11 at 17:50
I'm familiar with wc, I wish there was a W7 equivellant. – quillbreaker Oct 12 '11 at 18:17
up vote 5 down vote accepted

powershell is an option.

PS C:\Users\MW> dir -Recurse *.txt | Get-Content | Measure-Object

Count    : 11
Average  :
Sum      :
Maximum  :
Minimum  :
Property :
share|improve this answer

This may be a little old, but a faster way to find number of lines in any folder, is the following (assuming you're in correct folder via cmd):

type *.* | find /c /v "~~~"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.