Created
April 9, 2024 20:56
-
-
Save ZSendokame/e2cb35e94d7352802b6f4243fbc1a2a3 to your computer and use it in GitHub Desktop.
Get how many gigabytes there is in a directory.
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
function space(){ | |
param($Directory) | |
$total = 0 | |
foreach($file in Get-ChildItem $Directory){ | |
$total += $file.length | |
} | |
return $total / 1Gb | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment