echo off echo. echo Example with menu definition nested within the batch file echo. goto main ; Menu Def below $menu1 5 40 Title Choices Choice 2 $end_menu ; Batch file below :main bmenu @nested.bat menu1 echo. if errorlevel 2 goto 2 if errorlevel 1 goto 1 if errorlevel 0 goto esc :2 echo Choice 2 was made goto end :1 echo Choices was selected goto end :esc echo User hit ESC or ^C :end