I have put this question in the wrong forum. re-posting it here:
I am trying to change the project version in a xml file
using dos. when i execute the following code, an empty new.xml is created..there is nothing on the stdout as well. plz help
——
setLocal EnableDelayedExpansion > new.xml
for /f “tokens=* delims= ” %%a in (%1) do (
echo %%a
if %%a equ “^<currentVersion^>3.0.0^</currentVersion^>” (
echo ^<currentVersion^>3.0.0.1^</currentVersion^> >>new.xml
) else (
echo %%a
echo %%a>> new.xml
)
spaces or tabs and spaces or tabs on otherwise empty lines.
I am hoping this should deal with that:
Batch Variable how to