Here some part of the .config file that I have:
Here is my FindandReplace.cmd script. It uses VBScript to overcome the limitations that Batch imposes. Call it like this FindAndReplace
it is case sensitive. After you make the batch file, you would call it like this:
FindAndReplace some_name some_new_name *.config
FindAndReplace DB_name DB_new_name *.config
::FindAndReplace.cmd
@echo off
for /f "tokens=*" %%a in ('dir %~3 /b /a-d /on') do (
pushd %~dp0
if not exist _.vbs goto :MakeReplace
<%%a cscript /nologo _.vbs "%~1" "%~2" "%~3">new.txt
move /Y new.txt %%~nxa > NUL
popd
)
del _.vbs
goto :eof
:MakeReplace
>_.vbs echo Wscript.StdOut.Write Replace(WScript.StdIn.ReadAll,Wscript.arguments(0), Wscript.arguments(1))