I am using this command
Where {$_.Extension -match "zip||rar"}
but need to use this command too
Where {$_.FullName -notlike $IgnoreDirectories}
Should I use a && or II as in
Where {$_.Extension -match "zip||rar"} && Where {$_.FullName -notlike $IgnoreDirectories}
or
Where {$_.Extension -match "zip||rar"} || Where {$_.FullName -notlike $IgnoreDirectories}
?
What I am trying to accomplish is to have every zip and rar file be extracted but I want to skip the extraction of the zip or rar files in some of my directories. What is the best solution for this?
See Question&Answers more detail:os