Jelena Mamčenko Operating Systems Lecture Notes on Operating Systems 38 A zero (0) indicates a good run, anything above zero indicates an error condition. (Only DOS commands BACKUP and RESTORE have an exit code.) You can create small programs to capture the keyboard output and report it as an error level (see Batch Sample #3 later). Condition 2: String comparison is indicated by double equal signs: String1 == String2 compares the two strings. This comparison is often used with parameters and markers to check for a particular entry. For example, IF %1 == 40 MODE C40 checks parameter one for 40 and, if found, changes the display to 40-columns wide. Condition 3: The logical test checking for a file has the format: EXIST d:Filename You can use this test to check and see if a DOS disk is in the active drive (as one example). Another use might be to check for a particular file to see if the user has a valid disk in the drive.
This is the end of the preview.
access the rest of the document.