if exist %1 goto compile: echo No python source specified or file '%1' does not exist goto end: :compile python -m py_compile %1 %2 %3 if ERRORLEVEL 0 echo > OK :end