In batch, one should always avoid whitespace, not to mention that you used whitespace the wrong way:
Set b = 5
is setting %b %
to 5
The calculation of float
is not supported in batch.
To get around with it:
- Pass to powershell and redirect the output to your file
- Use my method below
DelayedExpansion
should be enabled.
Your script should look like:
@echo off
====SETLOCAL EnableDelayedExpansion
set/a"b=50, c=131"
for /L %%N in (1,1,100) do (
echo(title
echo(lambda 1.5406
echo(cell !b:~0,-1!.!b:~-1! !c:~0,-1!.!c:~-1! 90.00 100.00
echo(end of path
set/a"b+=1, c+=1"
)>"path%%N.txt"
Shortened using the newline hack:
@echo off
====SETLOCAL EnableDelayedExpansion
( set LF=^
%= EMPTY =%
)
set/a"b=50, c=131"
for /L %%N in (1,1,100) do (
echo(title!LF!lambda 1.5406!LF!cell !b:~0,-1!.!b:~-1! !c:~0,-1!.!c:~-1! 90.00 100.00!LF!end of path
set/a"b+=1,c+=1"
)>"path%%N.txt"