Skip to content

Instantly share code, notes, and snippets.

@jarek-przygodzki
Created October 25, 2013 13:48
Show Gist options
  • 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