home *** CD-ROM | disk | FTP | other *** search
-
-
-
- IF(REL2) ARP User's Manual IF(REL2)
-
-
-
- NAME
- IF - test for conditionals in batch files
-
- SYNOPSIS
- IF <condition to test for>
-
- DESCRIPTION
- You can use this command to provide some logic for batch
- files. You can test for the presence of a file using the
- EXISTS <filename> keyword, you can compare two strings for
- equality (disregarding case) using the EQ keyword ( "string"
- EQ "string") you can test for the previous programs return
- codes WARN >= 5, ERROR >= 10, FAIL >= 20. You can also
- combine any one of these commands with NOT, which inverts
- the result. I.E., if a file does exists, then NOT EXISTS
- file> will return FALSE, and cause the IF to fail. When IF
- fails, it moves the execution of the file ahead to the next
- ELSE or ENDIF command. ELSE and ENDIF are bound to the most
- recent IF.
-
- EXAMPLE
- IF EXISTS BCPL_PROGRAM
- Echo "You should delete BCPL_PROGRAM"
- ELSE
- Echo "An excellent Disk"
- ENDIF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 1 (printed 2/22/88)
-
-
-
-