I would love to do a modulo in batch ... does anyone know how to write it??
I figure it's something simlar to ADDITION:
set /a var1=4 + 2
So I was thinking of the logical choices:
set /a var2=4 % 2
- or -
set /a var2=4 MOD 2
Neither of these work. What's wrong? Am I at least close?
Search found 1 match
- 14 Aug 2007 09:05
- Forum: DOS Batch Forum
- Topic: Doing MOD calculations in batch
- Replies: 8
- Views: 42890