I wonder is there any way to check that if a label exist in a batch file?
If %input%=ABC ( If Label ABC Exists ( Goto ABC ) )
How
Try the following code:
echo off set "label=sub" REM next line to reset errorlevel to zero: (call ) call :%label% 2>nul || (echo %label% not found & exit /b 1) echo back from %label% Exit /b 0 :sab echo here we are