View Single Post
Old 11-28-2007   #4 (permalink)
Joey


 
 

Re: possibly pipe max?

test

"Keith Hill [MVP]" wrote:
Quote:

> "Frank" <Frank@xxxxxx> wrote in message
> news:157ADA17-F09E-48D6-94A5-B350B4E5A4C4@xxxxxx
Quote:

> > Nevermind, I just need to put the "|" inside. ,ie
> >
> > dir -r $dir | ?{$_.mode -match "d"}|%{$_.get_fullname()} |%{cacls $_|%{
> > $_ = $_.replace("(OI)","")
> > $_
> > }
> > }
> >
>
> A few tips. I would use ?{$_PSIsContainer} to match dirs (and
> ?{!$_.PSIsContainer} to match files) and rather than use $_.get_fullname()
> just use the property $_.FullName.
>
> --
> Keith
>
My System SpecsSystem Spec