Many times I needed to search for a specific string (e.g my name) in my computer or in a specific directory from a command line, basically I need to get the same result of the grep command on linux.
Findstr is a command-line tool which searches for patterns of text in files using also regular expressions, the following example search the string "Vittorio" in all the files of a C: partition.
findstr /s /M "Vittorio" C:\*.*
For more details about this powerfull tool, take a look here on Microsoft Site.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
1 commenti:
To count the word occurences in many files, just run
FINDSTR /C:"%keyword%" "%path%\*.log" > C:\result.txt
Then open result.txt with notepad and count the rows.
Post a Comment