1

This question already has an answer here:

Using the command prompt I would like to create a folder named "2013 Vacation Florida" (without quotes), Inside this folder I want to create sequentially dated folders, one for each day. These folders would be numbered "2013-04-01 to 2013-04-30" without quotes (2013 April 1st day etc). I can make the first folder by using the command

            mkdir "2013 Vacation Florida"

I can create all the daily folders by using the command

              for /l %a in (1,1,30) do md "2013-04-%a"

Question- How would I join these two commands into one?

I am using windows 7.

Thanks for your time.

marked as duplicate by ChrisF, Renan, 3498DB, TFM, Ƭᴇcʜιᴇ007 Feb 25 '13 at 5:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

9

mkdir automatically creates all parent directories, so you can use this:

for /l %a in (1,1,30) do md "2013 Vacation Florida\2013-04-%a"
  • Thanks for the prompt reply, only three minutes. This is exactly what I wanted. – user202016 Feb 24 '13 at 22:56
  • 1
    @bphurl to mark an answer as having solved your problem, please click the check mark to the left of the answer. – nhinkle Feb 24 '13 at 23:00

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