- PowerShell 命令(推荐,功能强大)
基本用法:
powershell
查看当前目录下所有文件夹的大小
Get-ChildItem -Directory | ForEach-Object {
.FullName | Measure-Object -Property Length -Sum).Sum
[PSCustomObject]@{
Directory = size / 1MB, 2)
Size_GB = [math]::Round(size = (Get-ChildItem -Recurse -File
size, $.Name)
}