Version 1.5 (May 2011)
© 2005-2011, Noël DANJOU
All rights reserved.
Table of Contents |
---|
Welcome |
Package Content |
Syntax |
Return Codes (ERRORLEVEL) |
History |
Latest Version |
Redistribution |
Contact Details |
Line Counter is a command-line tool for software developers. It reports the total number of lines of code and comment lines in C, C++, C#, Java, JavaScript and PHP source files. The output may be redirected to a text file.
Note: this version is Unicode only that means that it will only run in Windows XP and later. Windows 98, ME and 2000 are not supported anymore.
The package is provided as a compressed (zip) archive that holds a few files. The included files are described in the table below.
File | Description |
---|---|
lcounter.exe | The Line Counter program. |
readme.htm | This file. |
msvcr100.dll * | Microsoft C Runtime Library. |
* These files are not needed if the Microsoft Visual C++ 2010 Redistributable Package is installed on your system.
Line Counter features many parameters, for a whole list of the supported parameters and a description, type the following command in a Command Prompt:
lcounter /?
Examples:
To count lines in a specific directory (e.g. d:\dev\src) and its subdirectories and get a global summary, use:
lcounter d:\dev\src /subdir
If you want both file-by-file and global summaries, use the verbose mode like this:
lcounter d:\dev\src /subdir /display:verbose
When Line Counter is used in a batch file, you can use ERRORLEVEL to check the completion code returned by the program. The possible return codes are listed in the table below.
Code | Description |
---|---|
0 | Success. |
1 | Syntax error or help/registration information displayed. |
2 | System error. |
The latest version of Line Counter is always available for download from this address:
Computer magazine publishers are welcome to redistribute the application as-is on their complimentary or monthly CDs. Any other redistribution of the application with commercial products is strictly forbidden without my written permission. Please contact me for a license agreement (see Contact Details).
E-mail: webmaster@noeld.com
WWW: http://noeld.com