mardi 27 mars 2012

Powershell - Find a pattern in files (directory recursive)


$findPath="YOURPATH"
$patternToFind="YOURPATTERNTOFIND"
$patternFindInFiles=Dir $findPath -recurse|Select-String $patternToFind |Foreach {$_.path}
$patternFindInFiles|Out-File "found.txt"

Aucun commentaire:

Enregistrer un commentaire