@echo off

:start

rem set dir=%~n1
set dir=z_py

md %dir%-end
md %dir%-bin

copy /b /y Base\EDAOBase-949.py Base\EDAOBase.py

rem move /y "%dir%\*.py" "%dir%\."

for /f %%f in ('dir /b/on %dir%-del\*.py') do (
cd %dir%
del /q "%%f"
cd..)
cls

echo.
echo Convert

for /f %%f in ('dir /b/on %dir%\*.py') do (
copy /b /y "%dir%\%%f" >nul
echo.
echo %%~nf
"_python33\python.exe" "%%f"
move /y "%%~nf" %dir%-bin\. >nul
rem del /q "%%f"
move /y "%%f" %dir%-end\. >nul)

call cleanup.bat

echo.
pause

rem goto start
