I'm having problems with the following code:
FOR /f "tokens=*" %%A in (%MYFILE_PATH%) do (
[other stuff]
echo %%A>> "%MYFILE_PATH%.scratch"
)
The file being read has XML in it and when < and > signs are read, the script throws errors. How can I escape the contents of %%A to safely echo to the output file? I don't want to put double quotes around it since it will then echo the quotes too.
Thanks
<>characters, asecho %%Ais safe against special characters (only the exlamation mark can cause problems). I assume your real code call functions or copy %%A into other variables