While running a batch file in Windows XP I have found randomly occurring error message:
The system cannot find the batch label specified name_of_label
There are multiple possible ways to get the error.
Described by VonC - Wrong line endings, LF instead of CR/LF
Obscure long lines (if that happens accidential, your code is incredible worse)
Direct start another batch after calling a function.
Sample:
@echo off
call :func
echo back from second
exit /b
:func
second.bat
echo NEVER COME BACK HERE
This unexpectedly tries to goto
to the label :func
in second.bat.This is the described behaviour of the answer of Marshal