home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / pcmag / no.lzh / NO.DOC < prev   
Text File  |  1988-11-24  |  4KB  |  96 lines

  1.           NO                                     Charles Petzold
  2.           ______________________________________________________
  3.  
  4.           Purpose:  Excludes specified files in a subdirectory
  5.                     from the action of a command.
  6.  
  7.           Format:   NO filespec Command [parameter]
  8.  
  9.           Remarks:  NO.COM is designed for situations in which
  10.                     you want to apply a command such as DELete or
  11.                     COPY to all the files in a directory except
  12.                     one or two (or a class of) files.  For
  13.                     example,
  14.  
  15.                          NO *.BAS COPY *.* A:
  16.  
  17.                     copies all the files in your current
  18.                     subdirectory to drive A: except for those
  19.                     that have a .BAS extension.
  20.  
  21.                     To exclude more than one file (or category)
  22.                     you must use a separate NO command for each
  23.                     on the command line.  Thus,
  24.  
  25.                          NO *.ASM NO *.COM DEL *.*
  26.  
  27.                     deletes all files in the current directory
  28.                     except those with .ASM or .COM extensions.
  29.  
  30.                     Notes:
  31.  
  32.                     1.   NO.COM should not be used in conjunction
  33.                          with the PC-DOS BACKUP and RESTORE
  34.                          commands.  This is because NO operates
  35.                          by temporarily setting the "hidden" file
  36.                          attribute bit on the files to be
  37.                          excluded from the main command, then
  38.                          unhiding the files after the main
  39.                          command has been executed.  Since the
  40.                          DOS BACKUP/RESTORE operation acts on
  41.                          hidden and unhidden files alike, NO.COM
  42.                          cannot be used to exclude files from
  43.                          BACKUP/RESTORE.  RESTORE, indeed, will
  44.                          restore the supposedly excluded files as
  45.                          hidden, overwriting the originals.
  46.  
  47.                     2.   While NO.COM provides full path support
  48.                          (and so requires the use of DOS 2.0 or
  49.                          later), it is a good policy when using
  50.                          NO to use CHDIR to make the directory
  51.                          that contains the files on which you
  52.                          wish to operate the current directory.
  53.  
  54.                          For example, suppose you are in your
  55.                          root directory, one of whose subdirec-
  56.                          tories is \BASIC.  If you were to enter
  57.                          the command
  58.  
  59.                               NO *.BAS DEL \BASIC\*.*
  60.  
  61.                          you would not delete all the files in
  62.                          the \BASIC subdirectory except those
  63.                          with a .BAS extension, as you might have
  64.                          intended to do.  To do this from the
  65.                          root directory you would have had to
  66.                          enter
  67.  
  68.                               NO \BASIC\*.BAS DEL \BASIC\*.*
  69.  
  70.                          This complete filespec would tell NO
  71.                          that it had to protect files in the
  72.                          \BASIC, not in the current (i.e., root)
  73.                          directory.
  74.  
  75.                          If you follow our recommendation and
  76.                          enter
  77.  
  78.                               CD \BASIC
  79.                               NO *.BAS DEL *.*
  80.  
  81.                          thus making \BASIC your current
  82.                          directory before you start deleting, you
  83.                          will then clean out all but the .BAS
  84.                          files, just as you intended.
  85.  
  86.                     3.   Should a parity check error, power
  87.                          outage, or system crash occur during the
  88.                          brief period between the times NO hides
  89.                          and subsequently unhides the protected
  90.                          files, those files will subsequently
  91.                          seem to have disappeared.  They are not
  92.                          lost; only hidden from a DIR listing.
  93.                          Use ATTR.COM (included in this set of
  94.                          utilities) to change their hidden
  95.                          status.
  96.