@echo off
for /l %%a in (1,1,100) do (
if %%a lss 10 (
md DIR00%%a
call:Copy "DIR00%%a"
) else (
if %%a lss 100 (
md DIR0%%a
call:Copy "DIR0%%a"
) else (
md DIR%%a
call:Copy "DIR%%a"
)
)
)
pause
exit
:Copy
pushd %1
for /l %%b in (1,1,100) do (
if %%b lss 10 (
copy ..\001.txt 00%%b.txt
) else (
if %%b lss 100 (
copy ..\001.txt 0%%b.txt
) else (
copy ..\001.txt %%b.txt
)
)
)
popd