home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol4n24.zip / SWEEP.DOC < prev    next >
Text File  |  1986-09-11  |  2KB  |  64 lines

  1.  
  2.           SWEEP                                  Charles Petzold
  3.           Command                       PC Magazine Vol 4, No 23
  4.         Copyright 1985 Ziff-Davis Publishing Company
  5.           ______________________________________________________
  6.  
  7.           Purpose:  Causes a command to be successively executed
  8.                     in every subdirectory on a hard disk.
  9.  
  10.           Format:   SWEEP Command [parameter(s)]
  11.  
  12.           Remarks:  SWEEP starts from the current directory.  In
  13.                     order to use SWEEP to extend the range of a
  14.                     command to all the subdirectories on a disk,
  15.                     use CD (if necessary) to make the root
  16.                     directory your current directory.  From the
  17.                     root directory, the command
  18.  
  19.                          SWEEP DIR
  20.  
  21.                     will display the listings, by subdirectory,
  22.                     of every non-hidden file on the disk.  To
  23.                     erase all the .BAK files on a disk you need
  24.                     only get into the root directory and issue
  25.                     the command
  26.  
  27.                          SWEEP DEL *.BAK
  28.  
  29.                     SWEEP itself will not accept parameters other
  30.                     than its command.  Thus, if you are on drive
  31.                     C: and wish a directory of all files on drive
  32.                     D: to be sent to your printer, you must first
  33.                     make drive D: the current drive before you
  34.                     issue the command
  35.  
  36.                          SWEEP DIR > LPT1
  37.  
  38.                     (In this case you would either need a copy of
  39.                     SWEEP.COM on drive D: or else drive D: would
  40.                     have to be listed on your PATH.)
  41.  
  42.                     SWEEP can execute .BAT file commands (and
  43.                     even non-DOS commands, such as LOCATE.COM).
  44.                     A useful file called CLEAN.BAT might consist
  45.                     of the three lines
  46.  
  47.                     DEL *.BAK
  48.                     DEL *.TMP
  49.                     DEL *.OBJ
  50.  
  51.                     From the root directory, if you then enter
  52.  
  53.                          SWEEP CLEAN
  54.  
  55.                     all .BAK, .TMP, and .OBJ files will be erased
  56.                     from the disk.
  57.  
  58.                     Notes:
  59.  
  60.                     1.   Requires DOS 2.0 or later.
  61.  
  62.  
  63.  
  64.