Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## This will recursively search all txt files for the phrase 'windows 10' and return the path, line number, and line.
- ## You can of course change the file extension, leave out the -recurse switch to not search recursively,
- ## and change the search phrase, and leave out one or more of the Select options. Leaving off Format-List
- ## returns uglier results.
- get-childitem . -include *.txt -recurse | Select-String "windows 10" | Select Path, LineNumber, Line | Format-List
Advertisement
Add Comment
Please, Sign In to add comment