Home | Site Map | How To | Windows Vista | Case Studies | Articles | Forums | Services | Donations | Careers | About Us | Contact Us|

Web ChicagoTech
 

 

Testing a specific error level using If errorlevel command

In a case you want to check for a specific error level of a program, you may use the following command construct
IF ERRORLEVEL <N> IF NOT ERRORLEVEL <N+1> <COMMAND>

where <N> is the desired number. The <N+1> portion of the command must be calculated as the command is entered, because the MS-DOS command interpreter cannot perform mathematical calculations.
 

Related Topics

DOS Errorlevel command
The combination of the two or more IF ERRORLEVEL or nested IF Errorlevel statements
Testing a specific error level using If errorlevel command

 

 

 

  This web is provided "AS IS" with no warranties.
Copyright © 2002-2007 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.