Search notes:

cmd.exe: set /a to evaluate mathematical expressions

The set /a command in cmd.exe allows to calculate a basic mathematical expression and assign it to a variable.
@set /a forty_two=(20/2+3*3+2)*2
@echo %forty_two%
Github repository about-cmd.exe, path: /commands/set/a_eval-math-expression.bat
set /a can, for example, be used along with goto and if to create a sequence of numbers.

See also

set
Other cmd.exe commands

Index