Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Find string in all files in folders using PowerShell  (Read 2692 times)

0 Members and 1 Guest are viewing this topic.

Aby

  • Guest
Find string in all files in folders using PowerShell
« on: February 28, 2014, 02:50:46 am »
Find string in all files in folders using PowerShell

The following PowerShell command will search the “C:\path” folder and all files within it (including sub-folders) for the string “find me”. It will print a list of the file paths where the string was found.

Get-ChildItem “C:\path” -recurse | Select-String -pattern “find me” | group path | select name

----