View Single Post
Old 08-14-2007   #4 (permalink)
RichS


 
 

RE: stoopid newb question

this gives a prettier output

ls c:\ -rec | where{$_.mode -like "d*"} | foreach{ $size =
$di.getfolder($_.fullname).size/1mb; "{0,9} {1,2} " -f $size, $_.fullname }
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"tonyr" wrote:

> ok so I have the following - all on one line.
>
> ls c:\ -rec | where {$_.mode -like "d*"} | foreach
> {$di.getfolder($_.fullname).size/1024/1024}
>
> $di = fso
> the above line returns the folder size correctly but I can't seem to find a
> way to output both the fullname and the size, any help would be appreciated!
> tr
>

My System SpecsSystem Spec