Simple BTM: 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...