cd %ProjectDir% for /r %%i in (*.cs.frame) do SubWCRev . %%i %%~dpi%%~ni REM SET configfile=f005pc.hagenberg.fhooe.at - app.config REM SET configfile=localhost - app.config REM SET configfile=services.heuristiclab.com - app.config SET configfile=christoph - app.config IF EXIST "%configfile%" ( xcopy "%configfile%" "app.config" /Y echo config file replaced: %ProjectDir%%configfile% )