Name
find — \Windows\Command\find.exe
Synopsis
After searching the specified files, find
displays
any lines of text that contain the string you've
specified for your search. find
is useful for
searching for specific words (strings) in files, but
don't get it confused with Start →
Search → For Files or Folders, which is capable of
searching for text, files, directories, etc., and has many other
capabilities that the find
command
doesn't have. The find
options
are:
find [/v] [/c] [/n] [/i] [/offline] "string
" [filename
[ ...]]
Option |
Description |
---|---|
|
The text to look for, enclosed in quotation marks. |
|
The file(s) in which to search. Although wildcards
( |
|
Displays only the count of lines containing the string. |
|
Ignores the case of characters when searching for the string. |
|
Displays line numbers with the displayed lines. |
|
Displays all lines not containing the specified string. |
|
Include files with the offline attribute set (that otherwise would be skipped). |
Examples
find "redflag" myexployees.txt find /c "deceased" myexployees.txt for %f in (*.bat) do find "cls" %f >> cls.txt
Get Windows XP Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.