View Single Post
Old 08-14-2007   #3 (permalink)
Hal Rottenberg


 
 

Re: stoopid newb question

On Aug 14, 10:48 am, tonyr <to...@discussions.microsoft.com> wrote:
> ls c:\ -rec | where {$_.mode -like "d*"} | foreach
> {$di.getfolder($_.fullname).size/1024/1024}
>
> $di = fso


$objFSO = New-Object -com scripting.filesystemobject
$dirs = ls c:\ -rec | where { $_.PSIsContainer } # Another way to get
the directories
$dirs | % { "$($_.fullname) $($objFSO.getfolder($_).size/1024/1024)" }

I imagine there's prettier ways to do this.

My System SpecsSystem Spec