home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
mtwdo221.zip
/
ENV.CMD
next >
Wrap
OS/2 REXX Batch file
|
1995-06-07
|
1KB
|
64 lines
;
; When the environment variable SWAPDRIVE has the value C:
; then the condition is true
;
if env SWAPDRIVE == C:
+[386enh]swapfile=C:
else
+[386enh]swapfile=D:
endif
;
; Same a above, but since the compared value contains blanks,
; you must put the String into " .... "
;
; When you need to test for String = Including " character
; then you must encode it this way: "Including \" character"
;
;
if env SWAPTEXT == "Swapfile on drive C:"
+[386enh]swapfile=C:
else
+[386enh]swapfile=D:
endif
;
; When you need to test for Monitor = Compaq 15" VGA
; then you must encode it this way: "Compaq 15\" VGA"
;
;
if env Monitor == "Compaq 15\" VGA"
+[config]monitor=15 " VGA
else
+[config]monitor= Other type
endif
;
; If you need to use a backslash in the string, then just insert two
;
;
if env WATCOM == "C:\\WATCOM\\"
+[config]watcomdir=C:\watcom\
else
+[config]watcomdir=Not C:\watcom\
endif
;
; When you want to replace a string anywhere in the INI file, then
; use the r command with a empty section [].
;
r[]OldString=NewString
;
; When you would replace a = sign, then enclose the OldString in ".."
;
r[]"Old=String"=New=String2
;
; If the character is used without this special meaning, then
; put a \ in front of it. Do the same, if you have a " inside the "..."
;
r[]"Old\"Value=String"=New=String