일반

PowerShell: csv, txt 파일 Row Count

Xuniverse 2021. 1. 18. 08:32

PowerShell: csv, txt 파일 Row Count


PowerShell에서 csv, txt 파일 Row Count 하기

👉 실행문

Get-Content c:\file.csv | Measure-Object -line  
Get-Content "c:\new file.csv" | Measure-Object -line 👈 경로 또는 파일명에 공백이 있을 경우 쌍다옴표로 감싸주세요

👉 결과문

Lines Words Characters Property
----- ----- ---------- --------
   50

참고자료

참고. PowerShell: how to count number of rows in csv file?