@echo off setlocal enabledelayedexpansion set var=1 for /l %%i in (1,1,5) do ( set /a var =%%i echo !var! ) pause