136Views5Replies

Author Options:

How can I preform arithmetic with system variables in batch files? Answered


Discussions

Hmm..

set /a variable = 9 * 8

or

set /a variable = %var1% + %var2%

Hey, nice.  Do you know how to do that with .vbs files?

The same way you'd do it with batch.

a = 1
b = 2
c = a + b
d=msgbox ("C equals: " + c ".")

Or atleast, that should work...

Have a poke around www.dostips.com/
But bear in mind this is generally basic, crude stuff and you might want to step-up to something like VBS

L