ON ERROR terminates DO loop.

May 20, 2008
12,393
140
Syracuse, NY, USA
Simple BTM:

Code:
setlocal

::on error echo SYSERR = %_syserr

do x in /d"c:\" /s *.ico
    echo %x
enddo

As it is, the DO loop keeps going after access_denied errors. If I uncomment the ON ERROR statement, the BTM terminates on the first error.

What's up with that?
 

Similar threads