Search notes:
cmd.exe: Iterating over a series of n numbers
This example combines
goto
with
set /a
to create a sequence of numbers.
@set cnt=0 :loop @set /a cnt=%cnt%+1 @echo %cnt% @if %cnt% lss 20 goto loop
Github repository
about-cmd.exe
, path:
/commands/if/lss_iterate-1-to-20.bat
See also
for /l
is probably the preferred way to create sequences of numbers.
Other
cmd.exe
commands.
Index