Last weekend I’ve been asked to write a script that will output the size of all files within a folder, and the files in all its sub-folders.
So, again something that’s possible with a one-liner ![]()
Get-ChildItem D:\Software -recurse | Select-Object Name, @{Name=”KiloBytes”;Expression={$_.Length / 1KB}}
You don’t want the output to be in Kb but in MB? No problem…
Get-ChildItem D:\Software -recurse | Select-Object Name, @{Name=”MegaBytes”;Expression={$_.Length / 1MB}}

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 