@echo off

cd /d "%~dp0"

set input=%~nx1

for /r "%~dp0%input%" %%f IN ("*.py") DO (
If Not Exist "%~dp0%input%_bin" mkdir "%~dp0%input%_bin"
If Exist "%~dp0%input%_bin" cd /d "%~dp0%input%_bin"
echo %%~nf
"%~dp0_exe\PyLibs\python.exe" "%%f" --cp=ms949 "%~dp0%input%_bin"
echo.
cd /d "%~dp0"
)

pause
_exe\PyLibs\cleanup.bat
