|
Syntax
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]
| /V |
Displays all lines NOT containing the specified string. |
| /C |
Displays only the count of lines containing the string. |
| /N |
Displays line numbers with the displayed lines. |
| /I |
Ignores the case of characters when searching for the string. |
| "string" |
Specifies the text string to find. |
| [drive:][path]filename |
Specifies a file or files to search. |
If a pathname is not specified, FIND searches the text typed at the prompt
or piped from another command.
Examples
find /c "REM" c:\autoexec.bat
The above example would find any
"REM" statement in the autoexec.bat.
find
"hope" *.txt
Next this example searches for any text file
(.txt) that contains the text hope in the current directory.
Below is an example of the output you may see. As can be seen
from the below example the only file that contains hope is the
CH.TXT file.
---------- ACTIVE SETUP LOG.TXT
---------- CH.TXT
computer hope
---------- MODEMDET.TXT
---------- OEWABLOG.TXT
---------- SCHEDLGU.TXT
---------- SETUPLOG.TXT
|