Using Windows Powershell To Find A String Within Files

The below will find searchstr in all files with the .txt file extension in the current directory and all sub-directories and place the results in c:\tmp.txt
Select-String searchstr $(dir . -recurse | where {$_.extension -eq ".txt"}) | out-file c:\tmp.txt

Comments

Popular posts from this blog

AutoItX4Java - Java AutoIt Bridge

The SQL Server and .Net equivalent of PHP and MySQL's SHA1 function

Automated web testing with Java, Selenium RC, LoggingSelenium, HtmlUnit and TestNG