It turns out that errorlevel is returning the exit code of iterating statement in the for loop instead of the one immediately preceding it. for /r \\computer\share\x86 %%x in (*.xml) do ( IsVarMap.exe /file:"%%x" echo %ERRORLEVEL% ) Echoes 0 always. I
Read More...