For – Loop through a range of numbers | Windows CMD | SS64.com
Posted by jpluimers on 2017/06/27
Since I always forget:
for /l %1 in (1,2,200) do echo %1 >> text-%1.txt
This creates files with incremental filenames like this:
text-1.txt
text-3.txt
...
text-199.txt
–jeroen
via: For – Loop through a range of numbers | Windows CMD | SS64.com [WayBack]
ruurd said
Now do the same for 000 001 002 003 004 005 … 998 999
jpluimers said
Since you likely have done that before, please post the solution as a comment (;
Jürgen Krämer said
I think there is no way to make this a one-liner, so this is the best (batch file) I could come up with:
jpluimers said
Thanks!