maandag 6 mei 2013

Counting lines of code in multiple files

Ever wondered how much work you put in a project? The best way to operationalize is to count (obviously) the number of lines in your code. I'm aware that this is a relative measure: some people need more lines, but you may compare different projects.

I found the following line to type in MS DOS Prompt that counts lines within each of a series of files:

for %G in (*.do) do find /c /v "_+_" %G

Where *.do are the syntax files of the project in the present working directory. You still have to sum all output manually though.

Thanks to Marten Braten.