
我想計算給定目錄中滿足條件的所有檔案的總大小:
- 檔案的路徑(或同樣好,檔案的目錄)包含字串
DEV_
作業系統是Windows Server 2012。
答案1
當此資料夾是目前資料夾時使用 PowerShell:
Get-ChildItem * -Filter *DEV_* | Measure-Object -Sum Length
我想計算給定目錄中滿足條件的所有檔案的總大小:
DEV_
作業系統是Windows Server 2012。
當此資料夾是目前資料夾時使用 PowerShell:
Get-ChildItem * -Filter *DEV_* | Measure-Object -Sum Length