1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

on errorlevel n only executes when equal

Discussion in 'Support' started by David Marcus, Mar 12, 2011.

  1. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
    The Help says "ON ERRORLEVEL n will execute command when the internal ERRORLEVEL variable is greater than or equal to the integer specified by n." When I try it, it only executes when it is equal. I need to do "on errorlevel ge n" to have it execute when greater than or equal.

    Foo.btm
    on errorlevel 1 echo oops
    call Foo2
    echo %errorlevel

    Foo2.btm
    quit 2

    TCC 12.01.44 Windows Vista [Version 6.0.6002]
     
  2. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
    The Help for ERRORLEVEL says "ERRORLEVEL is an alternate name (included for compatibility with CMD.EXE) for the _? variable". Shouldn't that be "the ? variable"?
     

Share This Page