@echo off echo %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 if "%1"=="" goto showhelp if "%2"=="" goto showhelp if "%3"=="" goto showhelp rem Setting up temp variables. rem If you get a message about environments, this file won't work. if "%OutF%"=="" goto Ok goto problem :Ok set OutF=%1% rem Change directory in next line to point to WTA directory (with end \) if "%WTAdir%"=="" set WTAdir=F:\WTA\ if "%WTA%"=="" set WTA=%WTAdir%WTA rem First source file rem ================= if "%4"=="" goto last1 %WTA% -s %3 -t %2 -o yizox1.tmp -q -w shift rem Second source file rem ================== if "%4"=="" goto last2 %WTA% -s %3 -t yizox1.tmp -o yizox2.tmp -q -w shift :loop rem Odd source files rem ================ if "%4"=="" goto last3 %WTA% -s %3 -t yizox2.tmp -o yizox1.tmp -q -w shift rem Even sources file rem ================= if "%4"=="" goto last4 %WTA% -s %3 -t yizox1.tmp -o yizox2.tmp -q -w shift goto loop :last1 %WTA% -s %3 -t %2 -o %OutF% -q goto unset :last2 %WTA% -s %3 -t yizox1.tmp -o %OutF% -q del yizox1.tmp goto unset :last3 %WTA% -s %3 -t yizox2.tmp -o %OutF% -q del yizox1.tmp del yizox2.tmp goto unset :last4 %WTA% -s %3 -t yizox1.tmp -o %OutF% -q del yizox1.tmp del yizox2.tmp goto unset :problem echo Unable to proceed. The environment variable 'OutF' is already being used. echo ENV: OutF = %OutF% goto end :showhelp echo WTA multiple source compiler. echo Syntax: echo Compile {Output} {Template} {Source1} {Source2} {Source3} etc. :unset set OutF= :end