FindInFiles, PowerShell


/ Published in: Windows PowerShell
Save to your folder(s)

-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.


Copy this code and paste it in your HTML
  1. get-childitem "C:\Windows" -include "OEM*.inf","*.txt" -recurse -force | select-string "searchText" -List | %{$_.path }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.