Skip to content

Instantly share code, notes, and snippets.

@hyrious
Last active April 30, 2017 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyrious/af135364d3fe91da17b316f90d47b501 to your computer and use it in GitHub Desktop.
Save hyrious/af135364d3fe91da17b316f90d47b501 to your computer and use it in GitHub Desktop.
repeat n times do ...
@echo off
setlocal EnableDelayedExpansion
set T=%1
rem Preprocessing params
set cmdline=
shift
:pp_loop
if "%1" == "" goto :pp_next
set cmdline=%cmdline% %~1
shift
goto :pp_loop
:pp_next
:t_while
if %T% gtr 0 (
call %cmdline%
set /a T -= 1 >nul
goto :t_while
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment