Windows Command Prompt Tutorial
Introduction Internal and External commands Basic Commands Basic file commands Sorting the data Searching patterns in file Comparing files Variables in Windows command prompt Piping Input and Output Redirection View all processes and tasks killing tasks scheduling tasks Network commands System hardware commandsSearching patterns in windows command prompt
You can use 2 commands to find the sub strings in a file.- find – used to find the sub string in a file or input text
- findstr – finds patterns using regular expressions in a file or input text.
find command
Here is a syntax of find command.
find “<text-to-be-searched>” <file>
For example – if you want to search for string “amol” in a file called as names.txt, you can use below command.
find “amol” names.txt
findstr command
Here is a syntax of find command.
findstr “<regular-expression>” <file>
find-and-findstr-command-in-windows
find-and-findstr-command-in-windows

Web development and Automation testing
solutions delivered!!