@echo off
rem TWX Script Compiler Batch File
rem Rev: 3 
rem Date: 29dec10

rem Note: Place this file in the same folder as your scripts and make a shortcut to it.

:START
rem ===[ Config ]========================================================
rem Edit the next line to reflect the path to your TWXC.exe Compiler. ( no trailing \ )
rem 
set TW_TWXCPATH=c:\unzipped\TWX_204_RC\scripts
rem ---------------------------------------------------------------------
rem Edit the next line to reflect the file extension of the source file.
rem set TW_FILEEXT=.ts
set TW_FILEEXT=
rem ===[ End Config ]====================================================

cls
echo.
echo --==[ TWXC Compiler ]==--
echo.
set TW_TEMP=(no ext):
if %TW_FILEEXT%.==. set TW_TEMP=:
set TW_FILENAME=
set /p TW_FILENAME= -Enter the FILENAME %TW_TEMP%
if "%TW_FILENAME%"=="" goto NOPARMS
if not exist %TW_FILENAME%%TW_FILEEXT% goto FILENOTFOUND
echo.
echo # Vid Compiled: %DATE% - %TIME%>>%TW_FILENAME%%TW_FILEEXT% 
%TW_TWXCPATH%\TWXC.exe %TW_FILENAME%%TW_FILEEXT%
echo.
pause
goto START

:NOPARMS
echo Exiting..
goto FINISHED

:FILENOTFOUND
echo File %TW_FILENAME%%TW_FILEEXT% DOES NOT EXIST!
pause
goto START

:FINISHED
set TW_FILENAME=
set TW_TWXCPATH=
set TW_FILEEXT=
set TW_TEMP=
exit
