Skip to content

Instantly share code, notes, and snippets.

@adam-acosta
Created February 25, 2019 22:28
Show Gist options
  • Save adam-acosta/ba478e9dbd94a696c3c304fd29b527cc to your computer and use it in GitHub Desktop.
Save adam-acosta/ba478e9dbd94a696c3c304fd29b527cc to your computer and use it in GitHub Desktop.
count of lines of each file in folder organized
Get-ChildItem -re -in "*.cs" |
Foreach-Object {
$fileStats = Get-Content $_.FullName | Measure-Object -line
$linesInFile = $fileStats.Lines
Write-Host "$_=$linesInFile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment