[Toc][Index]

FFIND - Search for files

 
 Purpose:    Search for files by name or contents. 
             
 Format:     FFIND [/A[:][[-]rhsda] /B /C /D[list ] /E /I /K /L /M 
             /O[[:][-]acdeginrsu] /P /R /S /T"xx" /V /X["xx xx ..."] 
             file... 
             
             list :  A list of disk drive letters (without colons). 
             file :  The file, directory, or list of files or directories 
             to display. 
             
             /A(ttribute select)             /M (no footers) 
             /B(are)                         /O(rder) 
             /C(ase sensitive)               /P(ause) 
             /D(rive)                        /R(everse) 
             /E (upper case display)         /S(ubdirectories) 
             /I(gnore wildcards)             /T"xx" (text search string) 
             /K (no headers)                 /V(erbose) 
             /L(ine numbers)                 /X["xx"] (hex display/search 
                                             string) 
 
 File Selection 
 Supports extended wildcards, ranges, multiple file names, and include 
 lists. 
 Usage 
 FFIND is a flexible search command that looks for files based on their 
 names and their contents. Depending on the options you choose, FFIND can 
 display filenames, matching text, or a combination of both in a variety 
 of formats. 
 If you want to search for files by name, FFIND works much like the DIR 
 command.  For example, to generate a list of all the .BTM files in the 
 current directory, you could use the command: 

 
         [c:\] ffind *.btm
 
 
 The output from this command is a list of full pathnames, followed by the 
 number of files found. 
 If you want to limit the output to a list of *.BTM files which contain 
 the string color, you could use this command instead: 

 
         [c:\] ffind /t"color" *.btm
 
 
 The output from this command is a list of files that contain the string 
 color along with the first line in each file that contains that string. 
  By default, FFIND uses a case-insensitve search, so the command above 
 will include files that contain COLOR, Color, color, or any other 
 combination of upper-case and lower-case letters. 
 If you would rather see the last line of each file that contains the 
 search string, use the /R option, which forces FFIND to search from the 
 end of each file to the beginning.  This option will also speed up 
 searches somewhat if you are looking for text that will normally be at 
 the end of a file, such as a signature line: 

 
         [c:\] ffind /r /t"Sincerely," *.txt
 
 
 You can use extended wildcards in the search string to increase the 
 flexibility of FFIND's search.  For example, the following command will 
 find .TXT files which contain either the string June or July.  It will 
 also find Juny and Jule.  The /C option makes the search case-sensitive: 

 
         [c:\] ffind /c /t"Ju[nl][ey]" *.txt
 
 
 If you want to search for text that contains wildcard characters (*, ?, 
 [, or ]), you can use the /I option to force FFIND to interpret these as 
 normal characters instead of wildcards.  The following command, for 
 example, finds all .TXT files that contain a question mark: 

 
         [c:\] ffind /i /t"?" *.txt
 
 
 At times, you may need to search for data that cannot be represented by 
 ASCII characters.  You can use FFIND's /X option to represent the search 
 string in hexadecimal format (this option also changes the output to show 
 hexadecimal offsets rather than text lines).  With /X, the search must be 
 represented by pairs of hexadecimal digits separated by spaces; a search 
 of this type is always case-sensitive (in the example below, 41 63 65 is 
 the hex code for "Ace"): 

 
         [c:\] ffind /x"41 63 65" *.txt
 
 
 You can use FFIND's other options to further specify the files for which 
 you are searching and to modify the way in which the output is displayed. 
 
 Options 
    /A:     (Attribute select) Select only those files that have the 
            specified attribute(s) set.  Preceding the attribute character 
            with a hyphen [-] will select files that do not have that 
            attribute set.  The colon [:] after /A is optional.  The 
            attributes are: 
               R  Read-only 
               H  Hidden 
               S  System 
               D  Subdirectory 
               A  Archive 
 
 If no attributes are listed at all (e.g., FFIND /A ...), FFIND will 
 select all files and subdirectories including hidden and system files. 
  If attributes are combined, all the specified attributes must match for 
 a file to be selected.  For example, /A:RHS will select only those files 
 with all three attributes set. /B:(Bare) Display file names only and omit 
 the text that matches the search.  This option is only useful in 
 combination with /T or /X, which normally force FFIND to display file 
 names and matching text. /C:(Case sensitive) Perform a case-sensitive 
 search.  This option is only valid with /T, which defaults to a 
 case-insensitive search.  It is not needed with a /X hexadecimal search, 
 which is always case-sensitive. /D:(Drive)  Search all files on one or 
 more drives.  If you use /D without a list of drives, FFIND will search 
 the drives specified in the list of files.  If no drive letters are 
 listed, FFIND will search all of the current drive.  You can include a 
 list of drives or a range of drives to search as part of the /D option. 
  For example, to search drives C:, D:, E:, and G:, you can use either of 
 these commands: 

 
         [c:\] ffind /dcdeg ...
         [c:\] ffind /dc-eg ...
 
 
 Drive letters listed after /D will be ignored when processing file names 
 which also include a drive letter.  For example, this command displays 
 all the .BTM files on C: and E:, but only the .BAT files on D: 

 
         [c:\] ffind /s /dce *.btm d:\*.bat
 
 
 /E:Display filenames in the traditional upper case; also see SETDOS /U 
 and the UpperCase directive in CMD.INI. /I:(Ignore wildcards) Only 
 meaningful when used in conjunction with the /T"text" option.  Suppresses 
 the recognition of wildcard characters in the search text.  This option 
 is useful if you need to search for characters that would normally be 
 interpreted as wildcards: *, ?, [, and ]. /K:(No headers) Suppress the 
 display of the header or filename for each matching text line. /L:(Line 
 numbers) Include the line number for each text line displayed.  FFIND 
 numbers lines beginning with 1, unless ListRowStart is set to 0 in 
 CMD.INI.  A new line is counted for every CR or LF character (FFIND 
 determines automatically which character is used for line breaks in each 
 file), or when line length reaches 511 characters, whichever comes first. 
 /M:(No footers) Suppress the footer (the number of files and number of 
 matches) at the end of FFIND's display. /O:(Order) Set the sorting order. 
  You may use any combination of the following sorting options; if 
 multiple options are used, the listing will be sorted with the first sort 
 option as the primary key, the next as the secondary key, and so on: 
    
               -  Reverse the sort order for the next option. 
               a  Sort in ASCII order, not numerically, when there are 
            digits in the name. 
               d  Sort by date and time (oldest first); for HPFS drives, 
            also see /T. 
               e  Sort by extension. 
               g  Group subdirectories first, then files. 
               i  Sort by file description (ignored if /C or /O:c is 
            used). 
               n  Sort by filename (this is the default). 
               r  Reverse the sort order for all options. 
               s  Sort by size. 
               u  Unsorted. 
 
 /P:(Pause) Wait for a key to be pressed after each screen page before 
 continuing the display.  Your options at the prompt are explained in 
 detail under Page and File Prompts. /R:(Reverse) Only meaningful when 
 used in conjuction with the /T"text" or /X options.  Searches each file 
 from the end backwards to the beginning.  This option is useful if you 
 want to display the last occurrence of the search string in each file 
 instead of the first (the default).  It can also speed up searches for 
 information that is normally at the end of a file, such as a signature. 
 /S:(Subdirectories) Display matches from the current directory and all of 
 its subdirectories. /T"xx":(Text search) Specify the text search string. 
  /T must be followed by a text string in double quotes (e.g., /t"color"). 
  FFIND will perform a case-insensitive search unless you also use the /C 
 option.  For a hexadecimal search and/or hexadecimal display of the 
 location where the search string is found, see /X.    You can specify a 
 search string with either /T or /X, but not both. /V:(Verbose) Show every 
 matching line.  FFIND's default behavior is to show only the first 
 matching line then and then go on to the next file.  This option is only 
 valid with /T or /X. /X:(Hexadecimal display / search) Specify 
 hexadecimal display and an optional hexadecimal search string. 
 If /X is followed by one or more pairs of hexadecimal digits in quotes 
 (e.g., /x"44 63 65"), FFIND will search for that exact sequence of 
 characters or data bytes without regard to the meaning of those bytes as 
 text.  If those bytes are found, the offset is displayed (in both decimal 
 and hexadecimal).  A search of this type will always be case-sensitive. 
 If /X is not followed by a hexadecimal search string it must be used in 
 conjunction with /T, and will change the output format to display offsets 
 (in both decimal and hexadecimal) rather than actual text lines when the 
 search string is found.  For example, this command uses /T to display the 
 first line in each .BTM file containing the word hello: 

 
         [c:\] ffind /t"hello" *.btm
         ---- c:\test.btm:
         echo hello
 
             1 line in 1 file
 
 
 If you use the same command with /X, the offset is displayed instead of 
 the text: 

 
         [c:\] ffind /t"hello" /x *.btm
         ---- c:\test.btm:
         Offset: 26 (1Ah)
 
             1 line in 1 file
 
 
 You can specify a search string with either /T or /X, but not both. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs