lcount version 1

I was curious about how many lines of code were in one of my projects so I did a quick search on google, couldn’t find any software to count the lines in files that wasn’t shareware/commercial, so I wrote one. If you want a quick and dirty line counter for Windows, read on :-)

Download lcount.exe – Version 1.0 (~48KB)

It’s basic taking only a few parameters. By default it will skip readonly, hidden and system files and won’t search sub-directories.

Switches

  • –subdir – Scan sub directories
  • –readonly – Include read only files
  • –system – Include system files
  • –hidden – Include hidden files
  • –help – Show help

Example calls

lcount *.pas --subdir
lcount c:\*.txt --readonly --subdir
lcount c:\*.bat --hidden

Operation
As it goes, it lists files that its counted, with their individual line counts. Once its completed, you get a totals box (see below).

Files with multiple flags
If you have a hidden system files and you only specify –hidden, it will be skipped… likewise if you only specify –system, it will be skipped. You MUST specify –hidden and –system to have it included.

Disclaimer
This file is made available for public consumption. Use it at your own risk, I will not be held responsible for any losses you or anyone else incurrs as a result of its use. I make no warranties or guarantees of any kind relating to the program. It is what it is, a simple line counting tool that was banged together extremely quickly. You have been warned ;-)

Scanning sub-directories
I’ve expanded the stack size from the default used by the compiler. As a test I scanned my C:\ drive (Windows 98+many programs and files) and it ran through that OK taking just over 1 minute (thats on a Athlon 800). Sample output can be seen below.


c:\orstatus_hostilelist.txt - 34 lines
----- COMPLETED -----
Directories : 70319
Files scanned : 2218
Couldn't open : 0
Lines : 506714

500,000 lines :-o Thats a LOT of text.

Anyhow, if the program is useful to you, you are free to use it.

Leave a Reply

 

Bad Behavior has blocked 302 access attempts in the last 7 days.