|Developer(s)||Microsoft, ReactOS Contributors|
|Operating system||Microsoft Windows, ReactOS|
In computing, findstr is a command in the command line interpreters (shells) of Microsoft Windows and ReactOS. It is used to search for a specific text string in computer files. The command sends the specified lines to the standard output device.
FINDSTR flags strings [drive:][path]filename[...]
flagsThis can be any combination of flags described below.
stringsText to be searched for.
[drive:][path]filenameSpecifies a file or files to search.
/BMatches pattern if at the beginning of a line.
/EMatches pattern if at the end of a line.
/LUses search strings literally.
/RUses search strings as regular expressions.
/SSearches for matching files in the current directory and all subdirectories.
/ISpecifies that the search is not to be case-sensitive.
/XPrints lines that match exactly.
/VPrints only lines that do not contain a match.
/NPrints the line number before each line that matches.
/MPrints only the filename if a file contains a match.
/OPrints character offset before each matching line.
/PSkip files with non-printable characters.
/OFF[LINE]Do not skip files with offline attribute set.
/A:attrSpecifies color attribute with two hex digits. See "color /?"
/F:fileReads file list from the specified file(/ stands for console).
/C:stringUses specified string as a literal search string.
/G:fileGets search strings from the specified file(/ stands for console).
/D:dirSearch a semicolon delimited list of directories
Note: Following command displays the detailed help about this command:
Save your running services into file _services.txt and search in this file for lines containing word "network" - case insensitive:
@echo off set searchstr=network net start>_services.txt FINDSTR /I "%searchstr%" _services.txt pause
output would be:
Network Connections Network List Service Network Location Awareness Network Store Interface Service Windows Media Player Network Sharing Service Press any key to continue . . .
|This computer data storage-related software article is a stub. You can help Wikipedia by expanding it.|
|This Microsoft Windows article is a stub. You can help Wikipedia by expanding it.|