@echo off setlocal :: currentdir (C:\Research\Nightly) set currentdir=%CD% :: Need to edit rke-setup.bat and fill it in with local env vars values if not exist %currentdir%\tools\expeditee-release-kits\rke-setup.bat ( echo. echo ******************* echo. echo First edit %currentdir%\tools\expeditee-release-kits\rke-setup.bat.in echo to generate %currentdir%\tools\expeditee-release-kits\rke-setup.bat echo. echo ******************* echo. goto end ) :: rke-setup.bat uses local paths, so cd into expeditee-release-kits first :: then call rke-setup.bat to source the environment vars it sets pushd %currentdir%\tools\expeditee-release-kits call rke-setup.bat if ERRORLEVEL 1 ( echo error level 1 or more popd exit /B 1 ) popd :: Make sure the expeditee folder and its rke-build.properties file exist :: Then run the 'rke' command from snapshots\expeditee pushd %currentdir%\snapshots ::http://www.robvanderwoude.com/battech_ifexistfolder.php if not exist expeditee\ mkdir expeditee if not exist expeditee\rke-build.properties copy C:\Research\Nightly\tools\expeditee-release-kits\rke-build.properties.in expeditee\rke-build.properties pushd expeditee call rke :end cd %currentdir% endlocal ::exit