home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
GLOBO1.ZIP
/
CLEANUP.CMD
next >
Wrap
OS/2 REXX Batch file
|
1991-06-21
|
2KB
|
65 lines
:FILE NAME CLEANUP.CMD
:PURPOSE Frees up disk space by deleting unwanted files
:AUTHOR Richard W. Adams, ASP
:COPYRIGHT 1991 by author
:SYNTAX CLEANUP [extension ...]
:REQUIRES OS/2 and the program Globally
:----------------------------------------
@ECHO OFF
CLS
ECHO Cleanup, (C) 1991 by Richard W. Adams
ECHO
:-------------------------
:Was help requested ?
IF NOT "%1"=="?" GOTO START
ECHO This procedure deletes unwanted files on the default drive. You must have
ECHO the utility program Globally to run it. Syntax:
ECHO
ECHO CLEANUP [extension ...]
ECHO
ECHO If you specify the optional extensions (up to 9), all files with those
ECHO extensions will be deleted. If you list no extensions, the default is to
ECHO delete all files with extensions of BAK, CHK and TMP.
ECHO
GOTO END
:-------------------------
:START
:See if operator specified extensions to delete
ECHO This procedure deletes unwanted files on the default drive. You must have
ECHO the utility program Globally to run it. Files with the following extensions
ECHO will be deleted:
IF "%1"=="" GOTO NONE
ECHO
ECHO %1 %2 %3 %4 %5 %6 %7 %8 %9
ECHO
ECHO NOTE: Cleanup will use the following command interpeter file: %COMSPEC%.
ECHO The procedure will go much faster if the command interpreter is on a RAM
ECHO disk. If %COMSPEC% is not on a RAM disk, you may want to press Ctrl-Break
ECHO and reset your COMSPEC variable to point to a version on a RAM disk.
ECHO Otherwise,
PAUSE
GLOBALLY FOR %%F IN (*.%1 *.%2 *.%3 *.%4 *.%5 *.%6 *.%7 *.%8 *.%9) DO DEL %%F
GOTO DONE
:-------------------------
:NONE
ECHO
ECHO BAK CHK TMP
ECHO
ECHO These are the default settings. If you want to specify different extensions
ECHO to delete, press Ctrl-Break and enter CLEANUP [extension ...].
ECHO
ECHO NOTE: Cleanup will use the following command interpeter file: %COMSPEC%.
ECHO The procedure will go much faster if the command interpreter is on a RAM
ECHO disk. If %COMSPEC% is not on a RAM disk, you may want to press Ctrl-Break
ECHO and reset your COMSPEC variable to point to a version on a RAM disk.
ECHO Otherwise,
PAUSE
GLOBALLY FOR %%F IN (*.BAK *.CHK *.TMP) DO DEL %%F
:-------------------------
:DONE
CLS
CHKDSK
:-------------------------
:END