1

Is it possible to do something like below in Windows Command Prompt:

cd C:\MyFiles mkdir Files

What I'm trying to do is go into a specific folder using the cd command and then create a new folder using the mkdir command. I need to do this in one single command/line. This could be done by two separate commands, but I don't have this option.

1 Answer 1

3
cd /D C:\MyFiles & mkdir Files

Here's the documentation.

The /D parameter will also change the drive.

3
  • 1
    Beat me to it by seconds. +1 :)
    – nc4pk
    Aug 4, 2013 at 17:47
  • 2
    cd /D C:\MyFiles & mkdir Files Aug 5, 2013 at 16:33
  • 2
    I definitely agree with @Vlastimil's modification. Leaving off the /D flag has bit me in the past.
    – Dominic P
    Aug 20, 2013 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .