View Single Post
Old 08-14-2007   #5 (permalink)
tonyr


 
 

RE: stoopid newb question

dangit I tried something very similar not sure why it did not work! thanks
very much

"RichS" wrote:

> this would work
>
> PS> ls c:\ -rec | where{$_.mode -like "d*"} | foreach{ $size =
> $di.getfolder($_.fullname).size/1mb; Write-Host $_.fullname $size }
> --
> 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