darren2005 0 Junior Poster in Training


Can anyone advise on why the following code does not replace an XML value?

It seems the code does not bring up any known errors as such and when the code completes the settings.XML file is blank.

Still learning this stuff so please be gentle : )

Thanks in advance.

setLocal EnableDelayedExpansion > settings.xml

for /f "tokens=* delims=" %%a in (%1) do (
if "%%a" equ "<dontLogin>no</dontLogin>" (
echo matchhhhhh
>> settings.xml echo ^<dontLogin^>yes^</dontLogin^>
) else (
>> settings.xml echo. %%a
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.