Here's a script that will output the size of all files within a folder, and the files in all its sub-folders.
Outout in Kilobytes:
Get-ChildItem D:\Software -recurse | Select-Object Name, @{Name="KiloBytes";Expression={$_.Length / 1KB}}
Outout in Megabytes:
Get-ChildItem D:\Software -recurse | Select-Object Name, @{Name="MegaBytes";Expression={$_.Length / 1MB}}
0 comments:
Post a Comment