Schlagwort-Archive: powershell

How to count number of lines of code

For statistics I would like to know how many lines of code I have written over the last few years.
I have used the following code snippet for Windows PowerShell to count the number of lines of code in a directory recursively.
Open the Windows PowerShell and navigate to the main development folder.

dir -Recurse *.pas | Get-Content | Measure-Object -Line

My result:

2017_09_lines_of_code_powershell