Skip to main content

Find a specified string in one or more files from the command-line in Windows.

:: To find lines that contain a specified string:
find <string> <path/to/file_or_directory>

:: To display lines that do not contain the specified string:
find <string> <path/to/file_or_directory> /v

:: To display the count of lines that contain the specified string:
find <string> <path/to/file_or_directory> /c

:: To display line numbers with the list of lines:
find <string> <path/to/file_or_directory> /n