:: CONVRC.BAT by Terry Newton :: convert all redcode in current directory to simplified format :: new code created in rcload directory with .red extension :: requires pmars @echo off if .%1==.go goto %2 %comspec% /e:16384 /c %0 go main goto end :main ::----- edit as needed ----- set pmars=pmars.exe set outdir=rcload set size=8000 set proc=8000 set cyc=80000 set len=100 set dist=100 ::-------------------------- if not exist *.red goto nofiles md %outdir% for %%a in (*.red) do call %0 go proc %%a echo Done. goto end :nofiles echo No redcode in current directory to convert echo Current directory to this batch is: CD goto end :proc echo Processing %3 set opts=-s %size% -p %proc% -c %cyc% -l %len% -d %dist% find /i ";redcode" < %3 > %outdir%\%3 find /i ";name" < %3 >> %outdir%\%3 find /i ";author" < %3 >> %outdir%\%3 find /i ";strat" < %3 >> %outdir%\%3 find /i ";assert" < %3 >> %outdir%\%3 %pmars% %opts% -r 0 %3 | find /v "Program" >> %outdir%\%3 :end