Basic DOS commands---1. Basic folder operation commands

0. View the content under the path

  • If no path is specified, the current path will be defaulted
dir
  • If you specify a path, add the path after dir
dir c:\

1. Create a folder

 md folder name

如: md xuexi

You can also use the md command to create multiple folders at once, just follow all the folder names at the same time after md, and the computer recognizes the space as a separator.

md 文件夹名1 文件夹名2 文件夹名3 文件夹名4 ...

Such as:

md xue xi “xue xi”

As you can see, this command created three folders at the same time, namely "xue", "xi" and "xue xi". By default, the system uses spaces as separators to identify the names of each folder. If the folder name contains spaces, it will It is automatically split by the system. If you want to be a whole, you need to add double quotes "".

2. Delete the folder

rd file name

But rd can only delete empty folders, for non-empty folders, rd cannot be deleted

If you want to delete a non-empty folder, you need to add /s after the rd folder name

which is

dir 文件夹名 /s
如:dir shimisi /s

 

Guess you like

Origin blog.csdn.net/Justinhhhh/article/details/112647183