views:

61

answers:

2

To run the command:

cloc-1.08.exe wizardry

Obviously I don't want to go into DOS every time I want to do a line count.

+2  A: 

It's as simple as the pause command:

x.bat:

@echo off
cloc "C:\temp\lua"
pause

Output in new window after double clicking on x.bat:

      99 text files.
      96 unique files.
       9 files ignored.

http://cloc.sourceforge.net v 1.08  T=2.0 s (45.0 files/s, 13856.5 lines/s)
-------------------------------------------------------------------------------
Language          files     blank   comment      code    scale   3rd gen. equiv
-------------------------------------------------------------------------------
C                    35      2028       762     11170 x   0.77 =        8600.90
HTML                  5      2927        12      6718 x   1.90 =       12764.20
C/C++ Header         24       828       796      1511 x   1.00 =        1511.00
Lua                  20        69        71       385 x   4.00 =        1540.00
make                  3        67        43       244 x   2.50 =         610.00
CSS                   2        10         0        44 x   1.00 =          44.00
DOS Batch             1         2         0        26 x   0.63 =          16.38
-------------------------------------------------------------------------------
SUM:                 90      5931      1684     20098 x   1.25 =       25086.48
-------------------------------------------------------------------------------
Press any key to continue . . .

pause forces the window to stay open until you hit a key or manually close the command window.

Mark Rushakoff
thanks. "cloc" without the "-1.08" didn't work, but otherwise perfect
Iain
It's installed as just `cloc` on my machine. Feel free to accept my answer since it seems to have solved your problem.
Mark Rushakoff
A: 
@echo off
cloc-1.08.exe wizardry
pause
Iain
You're probably going to need the full path to `wizardry` on that second line.
Mark Rushakoff
Oh I just stuck cloc in the project directory. Where should I put it?
Iain