@echo off

pushd ..

if EXIST exp_%1.dpr dcc32 -cc exp_%1.dpr
if EXIST exp_%1.cpp cl exp_%1.cpp

for /l %%i in (1, 1, 9) do (
    copy tests\0%%i exp.in
    exp_%1.exe
    copy exp.out tests\0%%i.a
)

for /l %%i in (10, 1, 55) do (
    copy tests\%%i exp.in
    exp_%1.exe
    copy exp.out tests\%%i.a
)

popd