Return to Snippet

Revision: 9910
at November 28, 2008 21:16 by jimfred


Initial Code
get-childitem "C:\Windows" -include "OEM*.inf","*.txt" -recurse -force | select-string "searchText" -List | %{$_.path }

Initial URL


Initial Description
-force will include system/hidden files.
%{$_.path } will print the filepath rather than the grep-like line containing searchText
-List results in 1 hit per file rather than each line containing searchText.

Initial Title
FindInFiles, PowerShell

Initial Tags


Initial Language
Windows PowerShell