Skip to content

Instantly share code, notes, and snippets.

@jarek-przygodzki
Created October 25, 2013 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarek-przygodzki/7154976 to your computer and use it in GitHub Desktop.
Save jarek-przygodzki/7154976 to your computer and use it in GitHub Desktop.
Batch script for loop
for /l %x in (1, 1, 100) do <cmd>
# two %s if it's in a batch file
for /l %%x in (1, 1, 100) do <cmd>
# ultiple commands for each iteration
for /l %x in (1, 1, 100) do (
echo %x
copy %x.txt z:\whatever\etc
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment