My text file "new1.txt" contains the following:
1:Q4659A.LDS:4:LNAM=90210;90210
2:Q4159A.LDS:4:LNAM=90232;90210
- I have tried to use delayed expansion logic but always end with error as
==,%" was unexpected at this time.
Code:
set "search=="
set "replace=,"
echo %search%
echo %replace%
set "textfile=new1.txt"
set "new1file=new2.txt"
(for /f "delims=" %%i in (%textfile%) do (
set "line=%%i"
set "line=!line:%search%=%replace%!"
echo(!line!
endlocal
))>"%new1file%"
What can I try next?