Get the App
SLTechnology News&Howtos  ›  Servers  › 

1.1.1bat script commands MD MKDIR to create a directory create a folder

Shulou Source: shulou.com Published: 2022-06-02 15:30:32 09月27日 Update

Batch processing (Batch), also called batch script. It is used in DOS and Windows systems. The batch file has the extension bat.

BAT is not Baidu Ali Tencent. It's batch.

What the other definition is. We don't care about the development of history. Let's learn how to use it first.

Clerk, network management skills: Windows command line bat/cmd batch script writing application file management application

1.1.1bat script commands MD MKDIR to create a directory create a folder

Video tutorial: http://edu.51cto.com/course/11343.html

Command:

Md mkdir = make directory

Md [drive letter:] [path] New directory name

Simple application:

The current directory creates a folder (if the drive letter path is not written, it is the current directory by default)

Md folder 1 "text folder 2" folder 3.

Or

Md folder 1

Md folder 2

.

Normal application:

Specify directory creation folder

Md [drive letter:] [path] New directory name 1

Md "[drive letter:] [path] new directory name 2"

Md [drive letter:] [path] New directory name 3

.

PS: there are spaces in the directory to be enclosed in quotation marks.

Folder = active directory

Pause pause

First batch script

Before writing, let's set the "folder options" and uncheck the "hide the extension of the known file type".

1. Create a folder for the current directory 11

Md 11

two。 The current directory creates multiple folders 22 33 44 55

Md 22 33 44 55

Or

Md 22

Md 33

Md 44

Md 55

3. Specify a directory to create a folder C:\ bat create 11

Md C:\ bat\ 11

4. Specify directory to create multiple folders 22 33 44 55

Md C:\ bat\ 22

Md C:\ bat\ 33

Md C:\ bat\ 44

Md C:\ bat\ 55

5. Specify a directory to create a multi-tier directory folder: C:\ bat\ 99\ 88\ 77\ 66\ 55\ 44\ 33

Md C:\ bat\ 99\ 88\ 77\ 66\ 55\ 44\ 33

6. The name of the folder created has a space. I have a space in the middle.

Md "there is a space between me", "there is a space between me"

7. Create a folder C:\ bat\ I have spaces in the specified directory with spaces

What will be the impact of spaces in different positions? just try it on your own.

Md "C:\ bat\ I have a space\ 11"

Md "C:\ bat\ I have a space\ 2"

Tags: Files folders directories applications scripts spaces paths commands directory names multiple different location history multilayer quotation marks extensions skills tutorials clerks types Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Xiaomi Apple vpn Huawei