@echo off setlocal set _dir=%~dp0 set _dir=%_dir:~0,-1% set _opt=%OPT% if "%_opt%" == "" ( set _opt=c:\opt ) if not exist "%_opt%\." ( set _opt=d:\opt ) if not exist "%_opt%\." ( set _opt=e:\opt ) if not exist "%_opt%\." ( goto :EOF ) if exist "%_dir%\build\out\x64\Release\KeyView.exe" ( echo copying "%_dir%\build\out\x64\Release\KeyView.exe" to "%_opt%\bin\X64" copy /y "%_dir%\build\out\x64\Release\KeyView.exe" "%_opt%\bin\X64" copy /y "%_dir%\build\out\x64\Release\KeyView.exe" "%_dir%\..\KeyView\x64" ) if exist "%_dir%\build\out\x86\Release\KeyView.exe" ( echo copying "%_dir%\build\out\x86\Release\KeyView.exe" to "%_opt%\bin\x86" copy /y "%_dir%\build\out\x86\Release\KeyView.exe" "%_opt%\bin\X86" copy /y "%_dir%\build\out\x86\Release\KeyView.exe" "%_dir%\..\KeyView\X86" ) endlocal