I am trying to copy one file to another, replacing a particular bit of text. The original text has blank lines and lines beginning with semicolons, all of which I want to keep. How can I accomplish this? This code is what I have so far, but it ignores blank lines.
for /F "eol= tokens=1-2 delims=" %%x in (orig.ini) do (
for /F "eol= tokens=1-6 delims=" %%I in ("%%x") do (
IF %%I==TEXT1 (
) ELSE (