Category : Assembly Language Source Code
Archive   : DOCFILES.ZIP
Filename : SEARCH.DOC

Output of file : SEARCH.DOC contained in archive : DOCFILES.ZIP
SEARCH Michael J. Mefford
Command 1987/No. 4


Purpose: Searches all or specified directories on a
disk for either designated filenames or the
first occurrence of character strings within

Format: SEARCH [filespec] [string][/P][/C][/B]

Remarks: SEARCH defaults to a diskwide search of all
subdirectories on the current disk. You can
specify a different drive and/or a pathname
as part of the optional filespec parameter.
Filename searches support the DOS * and ?
wildcards. Character strings within files
are identified by putting them in quotation
marks. (The strings may themselves include a
pair of quotation marks.) Pressing either
Ctrl-Break or Ctrl-C terminates SEARCH

To redirect the output of the SEARCH command
to a printer, add /P to the command line, as
shown in the first example below. Adding a
similar /C switch will make the search for a
character string case-sensitive.

When searching for a character string, SEARCH
normally ignores .COM and .EXE files. While
this saves time, there may be occasions when
you want to find copyright notices, error
messages, et al. in an executable file. To
include binary files in the search, add the
/B parameter on the command line.

Example: To print out a list all the .COM files in the
\PROG subdirectory of your current drive, you
would enter


Example: To find which of the file(s) in your \LETTERS
subdirectory contained the salutation, Dear
Miss Jones, enter

SEARCH \LETTERS "Dear Miss Jones"


1. SEARCH returns a line number, based on
the number of previous carriage returns
in the file, when it finds a string. It
reports only the first occurrence of the
string in each file.

  3 Responses to “Category : Assembly Language Source Code
Archive   : DOCFILES.ZIP
Filename : SEARCH.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: