Been a while since I played with this...
one.Bat:
@echo off
echo one
call two.bat
if %errorlevel%==23 goto twentythree
echo unknown errolevel
goto end
:twentythree
echo Success!
:end
two.Bat:
@echo OFF
echo two
exit /B 23
If you just execute two.bat from within one.bat, then it will return to CMD when two exits, not to the same plave in one.bat - you need to use CALL two.bat