Windows Batch TutorialIntroduction First batch program Special characters in Batch programming Accepting user input Operators in Batch scripting Working with variables Integer operations Floating point operations Conditional Statements Looping statements goto statement Writing functions Passing arguments Returning exit code
Floating point operations in windows batchWe can not perform floating point operations in Windows command prompt. For that, we need to call external script like VB Script or Java Script. As shown in below example, we are calling vb script “ext.vbs” from within batch file to perform floating point operations.
Here is the contents of “ext.vbs” file. Below script will evaluate the first argument.
@echo off for /f %%x in (‘cscript //nologo ext.vbs “22/3″‘) do ( set output=%%x ) echo %output%
Complex problems, Simple Solutions