Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Count rows within CSV files, in a specified directory.
Get-ChildItem "C:\myfolder\" -re -in "*.csv" |
Foreach-Object {
$fileStats = Get-Content $_.FullName | Measure-Object -line
$linesInFile = $fileStats.Lines -1
Write-Host "$_,$linesInFile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.