home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_7 / 6.ddi / TAEXMPL1.ZIP / WHEREIS.DOC < prev    next >
Encoding:
Text File  |  1991-02-13  |  4.2 KB  |  112 lines

  1.  
  2.                           WHEREIS 2.0
  3.  
  4.   WHEREIS is a utility that searches a disk for files that match
  5.   a user-supplied file specification. The utility performs a
  6.   recursive search through any subdirectories it finds during
  7.   its search. WHEREIS can be given multiple file specifications,
  8.   and will show all files that match any of the given file
  9.   specifications. WHEREIS can also be instructed to perform a
  10.   DOS command on each of the files that is found.
  11.  
  12.   To search an entire disk for a particular file specification,
  13.   you would execute WHEREIS like this:
  14.  
  15.     whereis *.asm
  16.  
  17.   This would search through the entire drive (the current drive)
  18.   and display each instance of a file matching the file
  19.   specification *.asm.
  20.  
  21.   You can also provide an explicit drive specifier:
  22.  
  23.     whereis a:\*.asm
  24.  
  25.   This will search drive A: for all matching files.
  26.  
  27.   If you don't want to search an entire disk, you can explicitly
  28.   define the path from which to start the recursive search. For
  29.   example,
  30.  
  31.     whereis c:\borland\tasm\*.asm
  32.  
  33.   will search for all files matching *.asm in the directory
  34.   c:\borland\tasm and any subdirectories below it.
  35.  
  36.   You can halt execution of WHEREIS by pressing any key while
  37.   it's running. You will be given a message that execution has
  38.   been interrupted. If you want to pause execution of WHEREIS, press
  39.   the space bar. You will be given a prompt to press the spacebar
  40.   a second time to resume the search.
  41.  
  42.   If you want to search for several file specifications, just enter
  43.   multiple file specifications on the command line. For example,
  44.  
  45.     whereis c:\borland\tasm\*.asm *.inc
  46.  
  47.   will search for all the files matching *.asm or *.inc in the directory
  48.   c:\borland\tasm and any subdirectories below it. Note that only the
  49.   first file specification may contain a drive and path specification.
  50.  
  51.   If you want to perform a dos command on each file that WHEREIS finds,
  52.   you can give the dos command in delimiters on the command line. Valid
  53.   delimiters are '', "", or []. The dos command should contain one of the
  54.   following variables, that will substitute a given string on the
  55.   command line used for the dos command:
  56.  
  57.      %1 - Insert full path, filename and extension
  58.      %2 - Filename and extension (no path)
  59.      %3 - Only the path.
  60.      %4 - Only the filename before the extension followed by a .
  61.      %5 - Only the extension, preceeded by a .
  62.  
  63.   For example,
  64.  
  65.      whereis *.bak [del %2]
  66.  
  67.   will delete all .BAK files from your drive.
  68.  
  69.   Another example is,
  70.  
  71.      whereis *.asm *.inc [grep -i ideal %2]
  72.  
  73.   which will search all *.ASM and all *.INC files for the word ideal.
  74.  
  75.   When the dos command is given, it will be given in the same
  76.   directory that the file was found in. Note that the DOS command
  77.   could also be a call to a batch file. Whatever command, executable,
  78.   or batch file, that is specified should be reachable with the
  79.   current PATH environment variable, or a specific path to the
  80.   executable or batch file should be given within the delimiters.
  81.   Also the command should return to the same directory that it
  82.   was called from.
  83.  
  84.   Since WHEREIS calls COMMAND.COM to do the work of executing the
  85.   given dos command for each file that is found, performance is
  86.   best if COMMAND.COM is placed in a ram disk and COMSPEC=
  87.   environment variable is updated to point to the new copy of
  88.   COMMAND.COM. For a complete discussion of ram disks and
  89.   how to set the COMSPEC= environment variable please see your
  90.   DOS manual.
  91.  
  92.  
  93.                     How to assemble WHEREIS
  94.  
  95.   In order to assemble WHEREIS, execute the following command on the
  96.   DOS command line:
  97.  
  98.     make -fwhereis
  99.  
  100.   This will execute the command-line make utility MAKE.EXE and pass
  101.   it the make file WHEREIS.MAK. For instructions on assembling
  102.   specific modules in the WHEREIS program, see the comments at the
  103.   top of each module.
  104.  
  105.                   New Turbo Assembler 2.0 Features
  106.  
  107.   WHEREIS has been rewritten since Turbo Assembler 1.01 to show off
  108.   some of the new features of Turbo Assembler 2.0. The file
  109.   IWHEREIS.ASM has many of the features specially noted. Refer
  110.   to that file for more details.
  111.  
  112.