Code: Select all
For /F "tokens=*" %%B IN (test.txt) DO (
SETLOCAL ENABLEDELAYEDEXPANSION
SET t=is
SET old=%%B
SET new=!old:t=!
ECHO !new!
ENDLOCAL
)
Two questions.
First, can I store the target text ("is") in the variable t and put t within the !!variable? It seems not working.
Second, how can I substitute "=" the equal sign with something else?
I can't do this. There are two equal signs.
Code: Select all
SET new=!old:==!