CMD Variables & Arithmetic
Use variables to store data, paths, and perform calculations in CMD sessions and batch scripts:
- 📦 `set VAR=value` — Define a session variable
- 📖 `%VAR%` — Read the variable value
- 🔢 `set /a` — Do math: addition, subtraction, multiplication, division
- 🎲 `%RANDOM%` — Get a random number (0-32767)
Practical Dev Use:
```cmd
set /a BUILD_NUM=%BUILD_NUM%+1
echo Build number: %BUILD_NUM%
`
Auto-increment build numbers in your batch deployment scripts! 🚀
