Skip to content

Instantly share code, notes, and snippets.

@jamezp
Created September 14, 2017 00:05
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 jamezp/82121b290790e0f3fa314972069196b9 to your computer and use it in GitHub Desktop.
Save jamezp/82121b290790e0f3fa314972069196b9 to your computer and use it in GitHub Desktop.
@echo off
for /l %%x in (1, 1, 10) do (
setlocal enabledelayedexpansion
echo Executing run %%x for command %*
call %*
if not !errorlevel! == 0 (
echo Command %* failed at run %%x with status !errorlevel!
exit /b !errorlevel!
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment