@echo off if not exist %0 goto ERROR if not "%1"=="" goto %1 :MAIN call %0 ECHOHI call %0 ECHOBYE goto DONE :ECHOHI echo Hi! goto DONE :ECHOBYE echo Bye! goto DONE :ERROR echo. echo You must run this batch file with it's full name (including the extension). echo If you run it from another directory, you must include the path as well. echo If you include the path, it should be the "short" path (or at least not echo include spaces). Running it by typing "%0" isn't good enough! echo Double-clicking this batch file in Windows Explorer will work just fine... echo. goto DONE :DONE :: http://www.ericphelps.com