home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR3
/
FFG153.ZIP
/
DEMOBAT.ZIP
/
CLEANUP.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-06-25
|
1KB
|
41 lines
@echo off
if %1.==. goto USAGE:
cls
echo Cleaning up backup and temporary files from disk drive(s) %1.
echo Searching for files to select for deletion...
ffg> cln$tmp$.bat /fb %1*[~,bak,bk!,!bk,tmp,temp,bkup]* /x*.[bat,cod]
ffg>>cln$tmp$.bat /fb %1\~trash~\*
ffg>>cln$tmp$.bat /fb %1\pdx\*.lck /d-1T
cls
echo Next you can edit out any lines with names of files you don't want deleted.
pause
ted cln$tmp$.bat
if exist cln$tmp$.bak del cln$tmp$.bak
cls
echo Press ^C to abort without deleting any files.
echo Otherwise to begin deleting files [SIMULATED]
echo.
echo The "DIR" command is used in lieu of the "DEL" command to simulate deletion.
pause
echo on
@call cln$tmp$ dir
@echo off
del cln$tmp$.bat
goto END
:USAGE
cls
echo USAGE: %0 d:
echo.
echo Where d: is a list of drives to clean up.
echo.
echo For example: %0 CDE: will clean up drives C:, D:, E:
echo.
echo "%0" deletes backup and temporary files. You are given an
echo opportunity to override the delete operation for specific files
echo or can abort the entire operation.
pause
:END
@echo off
echo Done. Press any key for next demonstration...
pause>nul