Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to create 1000 folders numbered 000 to 999 insider a directory. How can I do this in cmd?

share|improve this question
It's problems like these I usually point people towards python for. Windows' command line is far from powerful, IMO it needs something to supplement it. –  Phoshi Oct 19 '10 at 21:46
I just need to do it once, dont wanna install python just for that... –  user11955 Oct 19 '10 at 21:47
Nah, you'll keep the Python around for other things ;) –  Ignacio Vazquez-Abrams Oct 19 '10 at 21:52

1 Answer 1

up vote 12 down vote accepted
for /l %i in (0,1,9) do md 00%i
for /l %i in (10,1,99) do md 0%i
for /l %i in (100,1,999) do md %i
share|improve this answer
Is this a foreign tongue of some sort? Whatever, it works great! Thanks! –  user11955 Oct 19 '10 at 21:58
Awesome! I just tried it. Would you mind explaining the syntax or giving a link to an explanation? –  Christopher Bottoms Jan 27 at 15:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.