(1) MD——Create a subdirectory
1. Function: create a new subdirectory
2. Type: internal command
3. Format: MD〈subdirectory name〉
4. Instructions for use:
(1) “drive”: specifies the disk drive letter where the subdirectory is to be created; if omitted, the current drive is used;
(2) “path”: the name of the parent directory in which the subdirectory is to be created; if omitted, it is created under the current directory.
Example: (1) Create a subdirectory named FOX under the root directory of drive C; (2) Then create a USER subdirectory under the FOX subdirectory.
C:、>MD FOX (create the FOX subdirectory on the current drive C)
C:、>MD FOX 、USER (create the USER subdirectory under the FOX subdirectory)
(2) CD——Change the current directory
1. Function: display the current directory
2. Type: internal command
3. Format: CD
4. Instructions for use:
(1) If the path and subdirectory name are omitted, the current directory is displayed;
(2) If the “CD、” format is used, it returns to the root directory;
(3) If the “CD.。” format is used, it returns to the upper-level directory.
Example: (1) Enter the USER subdirectory; (2) Return from the USER subdirectory to the subdirectory; (3) Return to the root directory.
C:、>CD FOX 、USER(enter the USER subdirectory under the FOX subdirectory)
C:、FOX、USER>CD.。 (return to the upper-level root directory)
C:、FOX>CD、 (return to the root directory)
C:、>
(3) RD——Delete subdirectory command
1. Function: delete a directory from the specified disk.
2. Type: internal command
3. Format: RD
4. Instructions for use:
(1) The subdirectory must be empty before deletion, that is, you must first enter the subdirectory and use DEL (the command for deleting files) to delete all files under the subdirectory, then return to the upper-level directory and use the RD command to delete the directory itself;
(2) The root directory and current directory cannot be deleted.
Example: To delete the USER subdirectory under the FOX subdirectory on drive C, the operation is as follows:
Step 1: First delete all files under the USER subdirectory;
C、>DEL C:、FOX、USER、*。*
Step 2, delete the USER subdirectory.
C、>RD C:、FOX、USER
(4) DIR——Display disk directory command
1. Function: display the contents of a disk directory.
2. Type: internal command
3. Format: DIR
4. Instructions for use: use of /P; when there is too much in the directory to be viewed and it cannot all be displayed on one screen, the screen will keep scrolling upward and it will not be easy to see clearly. After adding the /P parameter, the screen will display 23 lines of file information per page, then pause and prompt: Press any key to continue
Use of /W: after adding /W, only the filenames are displayed, while the file size and creation date and time are omitted. After adding the parameter, five filenames can be displayed per line.
PATH——Path setting command
1. Function: set the search path for executable files; only effective for files.
2. Type: internal command
3. Format: PATHdirectory{,〈directory path2〉…}
4. Instructions for use:
(1) When running an executable file, DOS will first search for the file in the current directory. If found, it runs it; if the file is not found, it will search for the file in the directories specified by the PATH command, one by one in order;
(2) If there are two or more paths in the PATH command, they are separated by a semicolon “;”;
(3) The PATH command has three usage methods:
PATH… (set the search path for executable files)
PATH: (cancel all paths)
PATH: (display the currently set paths)
(6) TREE——Display disk directory structure command
1. Function: display all directory paths on the specified drive and all filenames under those directories.
2. Type: external command
3. Format: TREE
4. Instructions for use:
(1) When the /F parameter is used, all directories and all files under the directories are displayed; if omitted, only directories are displayed, not the files under them;
(2) When the >PRN parameter is used, the listed directories and the filenames in the directories are printed out.
(7) DELTREE——Delete entire directory command
1. Function: delete the entire directory and its subordinate subdirectories and files.
2. Type: external command
3. Format: DELTREE〈path〉
4. Instructions for use: This command can delete the directory and all files, subdirectories, and lower-level subdirectories under it in one step. No matter whether the file attributes are hidden, system, or read-only, as long as the file is located under the directory being deleted, DELTREE treats them all the same and deletes them without exception. Be very careful when using it!!!