Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Here is a batch script example to generate all 6-digit numbers from 000000 to 999999. Note that this will produce a large number of lines and might take some time to execute depending on your system.
```batch
@echo off
setlocal enabledelayedexpansion
for /l %%a in (0,1,9) do (
for /l %%b in (0,1,9) do (
for /l %%c in (0,1,9) do (
for /l %%d in (0,1,9) do (
for /l %%e in (0,1,9) do (
for /l %%f in (0,1,9) do (
echo %%a%%b%%c%%d%%e%%f
)
)
)
)
)
)
endlocal
```
View 1,627 Replies 3