home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / email / qprn103.zip / PARMSCAN.DOC < prev    next >
Text File  |  1993-08-29  |  2KB  |  49 lines

  1.   PARMSCAN scans a set of batch file parameters to see if any of them
  2.   contain a given string.  
  3.  
  4.   The format is:
  5.     PARMSCAN string [parameters]
  6.  
  7.   For example, "PARMSCAN .REP %1 %2 %3 %4 %5 %6 %7 %8 %9" (w/o quotes)
  8.   will scan all the available parameters for ".REP".  PARMSCAN does
  9.   case-insensitive matching, so this line would also find ".rep", or
  10.   ".Rep".
  11.  
  12.   PARMSCAN returns an errorlevel of 0 if "string" is found, otherwise it
  13.   returns an errorlevel of 1.
  14.  
  15.   You can check for a match with "IF NOT ERRORLEVEL 1".  To see if there
  16.   wasn't a match, use "IF ERRORLEVEL 1".  For the example above, you could
  17.   use "IF NOT ERRORLEVEL 1 EXIT" (no quotes) to quit the batch file if
  18.   ".REP" was in any of the parameters.
  19.  
  20.   Remember that, when DOS sets an errorlevel, it also sets all lower
  21.   errorlevels.  That's why "IF ERRORLEVEL 0" can't be used to tell if
  22.   "string" was in any of the parameters.
  23.  
  24.   If you're running a batch file from another application, and want to
  25.   return to it if "string" isn't found, you can use "PARMSCAN %1 %1" 
  26.   (again w/o quotes) to force an errorlevel of 0 to be returned to the
  27.   application.  This may be needed if the application assumes that an 
  28.   error occurred.
  29.  
  30.                                    -----
  31.  
  32.   PARMSCAN.EXE and this documentation are Copyright (c) 1993 by David
  33.   Harden.  All rights reserved.  PARMSCAN is Freeware, there is no charge
  34.   for using it.
  35.  
  36.   You may copy and distribute PARMSCAN provided that PARMSCAN.EXE and this
  37.   documentation are distributed in their original, unaltered forms.  You
  38.   may not charge any fee for copying and distributing PARMSCAN other than a
  39.   minimal fee to cover the costs incurred.
  40.  
  41.   You may bundle and/or include PARMSCAN with other software, as long as
  42.   you include this documentation, and do not charge for it.
  43.  
  44.   There is no warranty of any kind, either express or implied, covering
  45.   this software or this documentation.  The copyright holder is in no way
  46.   responsible or liable for any losses or damages of any kind that may
  47.   result from the use of this software or this documentation, or from
  48.   inability to use them.
  49.