|AFAIK this cannot be achieved in a strictly batch script as batch scripts cannot handle floating point math so the results may not be precise. A batch script/VB script hybrid could be the answer but I am not familiar enough with Win2008 Server commands to be sure.|
You could test this script, no warranties. You didn't give any details of what the input file looked like, number of columns, column number to be added etc, so I simply saved the data you supplied to the trial.txt file for preliminary testing purposes.
echo wscript.echo eval(wscript.arguments(0))>%temp%\evaluate.vbs
for /f %%1 in (trial.txt) do (
set /a total=!total!+%%1
set /a count+=1
echo Final Result=%Final%
for /f %%1 in ('cscript //nologo %temp%\evaluate.vbs "%calc%"') do (
Please come back & tell us if your problem is resolved.