Windows findstr - sort of a bit like grep
If you don’t have UnxUtils and you don’t have Cygwin and you don’t want to use PowerShell and you just want to use the standard Windows command prompt…
A basic starter command:
|
|
…where:
/S
- search subdirectories/P
- skip binary files/I
- case-insensitive searching/N
- show line numbers of matchesC:"foo"
- search for the literal string foo
(no regex)*
- search all files
From there you can use findstr /?
for more help - such as /r
for regex support.
Another useful one, where /M
only prints the file name:
|
|
Author northCoder
LastMod 19-Nov-2022