Created
January 18, 2014 07:42
-
-
Save n-fukuju/8487498 to your computer and use it in GitHub Desktop.
PowerShellで、フォルダサイズを求める。
(PowerShell 2.0で確認)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [int] カレントパスのフォルダサイズ | |
(Get-ChildItem -Recurse -Force | Measure-Object -Sum Length).Sum | |
# [string, int][] カレントパス配下に存在する各フォルダのサイズ | |
Get-ChildItem | Select-Object Name,@{name="Size";expression={(Get-ChildItem $_.FullName -Recurse -Force | Measure-Object Length -Sum).Sum}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dir Z:\I04061 /s /a:-d > c:\temp\sizelist.txt