Cmd md command to create a folder

Source: Internet
Author: User

For example: md d: \ test, you can also use MD test to create the test folder in the current path.

If the folder to be created contains spaces or &, enclose the folder name in quotation marks, for example, MD "test ABC" and MD "ABC & XYZ ". What will happen if no quotation marks are used?

The test result is:

1. If the folder name contains spaces, the MD test ABC statement will create the two folders test and ABC in the current directory, sometimes we can get the miraculous effect of Simplicity: If you want to create the three folders ABC def xyz, you can directly use md abc def XYZ without having to write three MD statements. Of course, you can write md abc; def; XYZ or md abc, def, and XYZ.
2. If the folder name contains &, then md abc & XYZ will create the ABC folder and prompt that 'xyz' is not an internal or external command or can be run.ProgramOr a batch processing file. This is because & is the Connection Symbol of a composite statement. It regards the first and second parts as two substatements.

TIPS: do not forget to use double quotation marks if the folder name contains special characters!

MD also has a convenient function: to create an intermediate directory. That is to say, commands such as md a \ B \ c can create folder A under the current directory, and then create folder B under folder a and folder C under folder B in one go, instead of having to perform MD a first, then cd a, then md B, then cd B, then cd B, and then MD C.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.