@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\NETFrameworkVersionLister.exe" ( echo copying "%_dir%\build\out\x64\Release\NETFrameworkVersionLister.exe" to "%_opt%\bin\X64" copy /y "%_dir%\build\out\x64\Release\NETFrameworkVersionLister.exe" "%_opt%\bin\X64" ) if exist "%_dir%\build\out\x86\Release\NETFrameworkVersionLister.exe" ( echo copying "%_dir%\build\out\x86\Release\NETFrameworkVersionLister.exe" to "%_opt%\bin\x86" copy /y "%_dir%\build\out\x86\Release\NETFrameworkVersionLister.exe" "%_opt%\bin\X86" ) endlocal