Code: Select all
C:\>@set a=4>nul
C:\>@set /a a=4>nul
Missing operand.
Another example
C:\Users\gary\AppData\Local\Temp>for /L %f in (1,1,2) do @set /a ggg=4>nul
Missing operand.
Missing operand.
C:\>echo %ggg%
%ggg%
C:\>
I notice if I do this I get no error..
Code: Select all
C:\>for /L %f in (1,1,2) do @(set /a ggg=4)>nul
C:\>
But that doesn't work here
Code: Select all
C:\>for /f %f in (%tempfile3%) do @(set /a total+=%f)>nul
Missing operand.
It totals the numbers but it still says "Missing operand."
How can I get rid of that message or still run the command but prevent that message from appearing in the first place?