I need to write a decimal value assigned to environment variable finalval
into a text file as such:
echo.%%finalval>>^C:\TempSetup\id.txt
The problem is that after execution when I go to check the file content the actual value of finalval
isn't written into the file, instead it's just written %finalval%
.
In previous usages in the same batch file of the same style of echo
command, I've had no problems.
I have enabled delayedexpansion
both in the first line as well as the loop I am using to write into the file.
What am I doing wrong?