Avatar of jimmylew52
Flag for United States of America

asked on 

Powershell script to make a list of all directory paths that end in \bad

I need a list of directory paths that start c:\t2\   and end in   \bad  with varying folder structure. I tried this but it does not work.

 Set-Location C:\T2\postoffices
Get-ChildItem . | where{$_.Psiscontainer} -eq "C:\T2\postoffices\*\bad" | select name >> c:\list.txt

Avatar of undefined
Last Comment

8/22/2022 - Mon