Microsoft Windows XP Professional Administrators Guide
Searches for strings in files using regular expressions.
Syntax
findstr [/b] [/e] [/l] [/r] [/s] [/i] [/x] [/v] [/n] [/m] [/o] [/p] [/offline] [/g:file] [/f:file] [/c:string] [/d:dirlist] [/a:color attribute] [strings] [[drive:][path] filename [...]]
| Parameters | |
|---|---|
| | |
| Parameter | Purpose |
| | |
| [/b] | Specifies that the match must occur at the beginning of a line. |
| [/e] | Specifies that the match must occur at the end of a line. |
| [/l] | Performs a literal search using the search string. |
| [/c: string] | Uses the specified string as a literal search string. |
| [/r] | Uses search strings as regular expressions. |
| [/s] | Searches for matches in the current folder and all subdirectories. |
| [/I] | Specifies a case-insensitive search. |
| [/x] | Prints lines that contain a match. |
| [/v] | Prints lines that do not contain a match. |
| [/n] | Prints the line number. |
| [/m] | Prints the file name where a match is found. |
| [/o] | Prints the seek offset before each match. |
| [/p] | Skips nonprintable characters. |
| [offline] | Causes a file with the offline attribute set to be processed. |
| [/g file] | Specifies a file that contains the search strings. |
| [/f file] | Specifies a file that contains a file list. |
| [/d dirlist] | Searches a comma-delimited list of folders. |
| [/a color attribute] | Specifies two character hexadecimal color attributes. |