MeasureRows
0.9.3
Apteco PS Modules - PowerShell file rows count
Just use
Measure-Row -Path "C:\Temp\Example.csv"
or
"C:\Temp\Example.csv" | Measure-Row -SkipFirstRow
or
Measure-Row -Path "C:\Temp\Example.csv" -Encoding UTF8
or even
"C:\Users\Florian\Downloads\adressen.csv", "C:\Users\Florian\Downloads\italian.csv" | Measure-Row -SkipFirstRow -Encoding ([System.
Just use
Measure-Row -Path "C:\Temp\Example.csv"
or
"C:\Temp\Example.csv" | Measure-Row -SkipFirstRow
or
Measure-Row -Path "C:\Temp\Example.csv" -Encoding UTF8
or even
"C:\Users\Florian\Downloads\adressen.csv", "C:\Users\Florian\Downloads\italian.csv" | Measure-Row -SkipFirstRow -Encoding ([System.
Apteco PS Modules - PowerShell file rows count
Just use
Measure-Row -Path "C:\Temp\Example.csv"
or
"C:\Temp\Example.csv" | Measure-Row -SkipFirstRow
or
Measure-Row -Path "C:\Temp\Example.csv" -Encoding UTF8
or even
"C:\Users\Florian\Downloads\adressen.csv", "C:\Users\Florian\Downloads\italian.csv" | Measure-Row -SkipFirstRow -Encoding ([System.Text.Encoding]::UTF8)
to count the rows in a csv file. It uses a .NET streamreader and is extremly fast.
The default encoding is UTF8, but it uses the ones available in [System.Text.Encoding]
If you want to skip the first line, just use this Switch -SkipFirstRow
Show more
Just use
Measure-Row -Path "C:\Temp\Example.csv"
or
"C:\Temp\Example.csv" | Measure-Row -SkipFirstRow
or
Measure-Row -Path "C:\Temp\Example.csv" -Encoding UTF8
or even
"C:\Users\Florian\Downloads\adressen.csv", "C:\Users\Florian\Downloads\italian.csv" | Measure-Row -SkipFirstRow -Encoding ([System.Text.Encoding]::UTF8)
to count the rows in a csv file. It uses a .NET streamreader and is extremly fast.
The default encoding is UTF8, but it uses the ones available in [System.Text.Encoding]
If you want to skip the first line, just use this Switch -SkipFirstRow
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2025 Apteco GmbH. All rights reserved.
Package Details
Author(s)
- florian.von.bracht@apteco.de
Tags
Functions
PSEditions
Dependencies
This module has no dependencies.
Release Notes
0.9.3 Fixed documentation from Measure-Rows to Measure-Row
0.9.2 Updated tests and test files
Renamed main function into Measure-Row and dded alias Measure-Rows
Fixed output type to [long]
Fixed pipeline input to count multiple files and return one total count
Throwing exception if one of multiple files does not exist instead of Write-Error
Invoke-ScriptAnalyzer does not return any problems anymore ;-)
0.9.1 Fix for resolving absolute paths
0.9.0 Initial release of measure rows module through psgallery
FileList
- MeasureRows.nuspec
- Public\Measure-Row.ps1
- MeasureRows.psd1
- MeasureRows.psm1