@echo off if NOT %ERRORLEVEL% == 0 goto antsh %~d0%~p0/tchcmd.cmd %* rem it won't get here unless you use "call" on the .cmd :antsh sh %~d0%~p0/tch.sh %*