Return Values Using Exitcode

Previous  Next

The return values within a batch file can be handled as follows:



DSDOS.EXE /partition

If Errorlevel 3 Goto LABEL3      ; The sequence must always

If Errorlevel 2 Goto LABEL2      ; view the highest Errorlevel

If Errorlevel 1 Goto LABEL1      ; first!


Echo INSTALL.BAT: No partitions exist!



Echo INSTALL.BAT: One partition exists!

Goto END



Echo INSTALL.BAT: Two partitions exists!

Goto END



Echo INSTALL.BAT: Three or more partitions exist!

Goto END




Additional information about batch programming is listed in the manual of the DOS operating system.



See also:

Command Line Options

Script File