automation - batch file: arithmetic operations on decimal values -
i'm forced use dos write batch scripts. how arithmetic operations on variables? how re-write last line?
for %%f in (*.ogg) call :runsox "%%f" del temp.ogg tmpfile goto :eof :runsox soxi -d %1>tmpfile set /p decvalue=<tmpfile * 1.2
update:: following bhu1st's post, couldn't see how apply script. gnu bash has same problem, cannot operate on floating point numbers. way solve in bash calculate value bc, command line calculator. download command line calculator. , use in line:
calcoo %decvalue%*1.2>tmpfile
try this:
set /p tmpvalue=<tmpfile set /a decvalue=tmpvalue * 1.2
but then, result truncated. no decimals.
Comments
Post a Comment