function fn-GetLineCount ($FilePath)
{
$nlines = 0;
gc $FilePath -read 1000 | % { $nlines += $_.Length };
[string]::Format("{0} has {1} lines", $FilePath, $nlines)
}

 

使用例子:

fn-GetLineCount "C:\output.csv"

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-07-03
  • 2021-12-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-22
  • 2021-11-26
  • 2021-05-17
  • 2021-12-08
  • 2022-01-30
  • 2021-09-30
相关资源
相似解决方案