home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
sortboot.zip
/
SORTBOOT.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1997-06-26
|
3KB
|
100 lines
/* Sort config.sys for speed */
/* Author: J. Pedone (jpedone@flash.net) */
/* Legal Stuff: */
/* It's free - you get what you pay for */
/* Load the REXX functions */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* set up carraige return, tab and pull in the drive letter */
OPTIONS 'EXMODE'
cr='0d'x
lf='0a'x
tab = '09'x
ARG drive,1
rc = SysSearchPath('.' , 'config.new')
if rc <> ' ' THEN
DO
SAY cr
SAY 'Deleteing previous CONFIG.NEW file'
DEL 'config.new'
END
IF drive = '?' THEN SIGNAL help
IF drive = '' THEN SIGNAL help
Call SysFileSearch 'IFS=' , drive':\CONFIG.SYS', 'check.'
DO i=1 TO check.0
CALL check_it
END
Call SysFileSearch 'BASEDEV=' , drive':\CONFIG.SYS', 'check.'
DO i=1 TO check.0
CALL check_it
END
Call SysFileSearch 'SET' , drive':\CONFIG.SYS', 'check.'
DO i=1 TO check.0
CALL check_it
END
Call SysFileSearch 'DEVICE=' , drive':\CONFIG.SYS', 'check.'
DO i=1 TO check.0
CALL check_it
END
Call SysFileSearch '=' , drive':\CONFIG.SYS', 'others.'
DO i=1 TO others.0
test = substr(others.i,1,3)
PARSE UPPER VAR test test
IF (test = 'SET') | (test = 'DEV') | (test = 'BAS') | (test = 'RUN') | (test = 'IFS') | (test = 'REM') THEN
NOP
ELSE
DO
CALL CHAROUT 'config.new' , others.i
CALL CHAROUT 'config.new' , cr
CALL CHAROUT 'config.new',lf
END
END
Call SysFileSearch 'RUN=' , drive':\CONFIG.SYS', 'check.'
DO i=1 TO check.0
CALL check_it
END
SAY cr
SAY cr
SAY tab tab tab 'Your sorted 'drive':\CONFIG.SYS file has'
SAY tab tab tab 'been saved as CONFIG.NEW.'
SAY cr
exit
help:
SAY tab tab tab 'Usage:'
SAY tab tab tab tab 'SORTBOOT d'
SAY cr
SAY tab tab tab 'Where:'
SAY tab tab tab tab 'd is the drive letter that contains'
SAY tab tab tab tab 'your CONFIG.SYS file.'
exit
check_it:
test = substr(check.i,1,3)
PARSE UPPER VAR test test
IF test = 'REM' THEN
NOP
ELSE
DO
CALL CHAROUT 'config.new', check.i
CALL CHAROUT 'config.new',cr
CALL CHAROUT 'config.new',lf
END
RETURN