home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / FFG153.ZIP / DEMOBAT.ZIP / CLEANUP.BAT < prev    next >
DOS Batch File  |  1993-06-25  |  1KB  |  41 lines

  1. @echo off
  2.   if %1.==. goto USAGE:
  3.   cls
  4.   echo Cleaning up backup and temporary files from disk drive(s) %1.
  5.   echo Searching for files to select for deletion...
  6.   ffg> cln$tmp$.bat /fb %1*[~,bak,bk!,!bk,tmp,temp,bkup]* /x*.[bat,cod]
  7.   ffg>>cln$tmp$.bat /fb %1\~trash~\*
  8.   ffg>>cln$tmp$.bat /fb %1\pdx\*.lck /d-1T
  9.   cls
  10.   echo Next you can edit out any lines with names of files you don't want deleted.
  11.   pause
  12.   ted cln$tmp$.bat
  13.   if exist cln$tmp$.bak del cln$tmp$.bak
  14.   cls
  15.   echo Press ^C to abort without deleting any files.
  16.   echo Otherwise to begin deleting files [SIMULATED]
  17.   echo.
  18.   echo The "DIR" command is used in lieu of the "DEL" command to simulate deletion.
  19.   pause
  20.   echo on
  21.   @call cln$tmp$ dir
  22.   @echo off
  23.   del cln$tmp$.bat
  24.   goto END
  25. :USAGE
  26.   cls
  27.   echo USAGE: %0 d:
  28.   echo.
  29.   echo        Where d: is a list of drives to clean up.
  30.   echo.
  31.   echo        For example: %0 CDE: will clean up drives C:, D:, E:
  32.   echo.
  33.   echo "%0" deletes backup and temporary files.  You are given an
  34.   echo opportunity to override the delete operation for specific files
  35.   echo or can abort the entire operation.
  36.   pause
  37. :END
  38. @echo off
  39. echo Done.  Press any key for next demonstration...
  40. pause>nul
  41.