Last active
May 7, 2022 20:37
-
-
Save Jammyjamjamman/2d656b56d61c51230299a38850d8055f to your computer and use it in GitHub Desktop.
Basic powershell script to get folder sizes in current dir (depth 1).
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
Get-ChildItem -Directory | ForEach-Object { | |
echo "Folder: $($_.Name)" | |
echo "Size: $((Get-ChildItem $_.Name -Recurse | Measure-Object -Property Length -Sum).Sum/(1024*1024*1024))GiB" | |
echo "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment