🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #25615

Re: More on setting DOS errorlevel

#25615
From: emartins
Date: Wed, 16 Mar 1988 02:44
23 lines
1040 bytes
The problem is that DOS tests ERRORLEVEL for a value GREATER THAN or
EQUAL to whatever number you've specified on your batch file... So, you
have to begin testing for the highest errorlevel. Try somethink like
 
  IF ERRORLEVEL 5 GOTO FOO1
  IF ERRORLEVEL 4 GOTO FOO2
  IF ERRORLEVEL 3 GOTO FOO3
  GOTO END
  :FOO1
  ECHO ERRORLEVEL IS FIVE!
  GOTO END
  :FOO2
  ECHO ERRORLEVEL IS FOUR!
  GOTO END
  :FOO3
  ECHO ERRORLEVEL IS THREE!
  :END

  This should work...
   

   Eduardo Martins (emartins@uxh.cso.uiuc.edu)
Technical Details
Message-ID: <19500008@uxh.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxh.cso.uiuc.edu!emartins
References: <4835@sigi.Colorado.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxh.cso.uiuc.edu!emartins
From: emartins@uxh.cso.uiuc.edu
Newsgroups: comp.sys.ibm.pc
Subject: Re: More on setting DOS errorlevel
Message-ID: <19500008@uxh.cso.uiuc.edu>
Date: 16 Mar 88 02:44:00 GMT
References: <4835@sigi.Colorado.EDU>
Lines: 23
Nf-ID: #R:sigi.Colorado.EDU:4835:uxh.cso.uiuc.edu:19500008:000:517
Nf-From: uxh.cso.uiuc.edu!emartins    Mar 15 20:44:00 1988