count number of lines in csv without opening it code example
Example: count number of lines in csv without opening it
# in powershell
$lines = 0
$fileReader = New-Object IO.StreamReader 'NAME_OF_YOUR_CSV.csv'
while ($fileReader.ReadLine() -ne $null)
{
$lines++
}
$fileReader.close()
echo $lines