Skip to content

Instantly share code, notes, and snippets.

@jetstreamin
Forked from jarek-przygodzki/forLoop.bat
Created September 19, 2019 12:04
Show Gist options
  • Save jetstreamin/b8c9e9411179cd9a5261f716be238b8c to your computer and use it in GitHub Desktop.
Save jetstreamin/b8c9e9411179cd9a5261f716be238b8c 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