|It would probably help if you posted your code, since everyone's approach is different. Here's my take on it:|
@echo off & setlocal
set /p x=label:
if not defined x goto :eof
call :%x% 2>nul
echo ok 1
echo ok two
::===== end snippet
If all the extensions use the same code, you can stack them, like:
echo processing %0
blah blah blah
This should have worked but didn't (hint: anyone out there know why?):
call :label 2>nul || goto :WrongAnswerDude
my errorlevel was always 1 regardless, so it always executed Wrong. Even as a code-block (call :label), it still threw an errorlevel.
oops, hi Mike, crossed in the mail!