Windows and its father. Four

  
        

[本站原创] [serialized tutorial
series] "Windows and its father" about DOS
Chapter III Section 1

Chapter III

DOS
Internal Commands for the first section of the management directory

In the previous two chapters we have studied the file system and command system of DOS
These basics, from this chapter, we will first learn some of the most commonly used and most important DOS
commands. What is different from the general textbooks is that I mainly talk about the application skills and error-prone aspects of the DOS
command, and describe what kind of operations should be used instead in Windows.

The commands used to manage directories in the DOS
command have three internal commands: MD, RD, and CD, and four external commands: TREE, DELTREE, MOVE, and SUBST. introduce. Please note that each DOS
system comes with a "/?" switch that can be used to get help for the command, so this switch is not mentioned. The DOS
command does not distinguish between uppercase and lowercase, but for the sake of consistency, the command examples in this column are capitalized.

Please note that subdirectories are also a special kind of file, so I put directory management into this chapter. Whether it is a directory name or a file name, you must specify its drive letter and path to be able to locate it accurately. In this column, the file name and directory name are in the format of "drive letter: path\\file (directory) name" unless otherwise specified. The default principle has been explained in the second section of the previous chapter, "Rules 6", and should be used as much as possible. This way you can type a few characters, and the second is to help deepen the understanding of the tree structure.
Drive letter + ":" command - change the current disk command

Command format drive letter:

Switch no

function is represented by the specified drive letter The disk is set to the current disk.
MD Command--Create Subdirectory Command

Command Format MD Subdirectory Name

Switch None

Function Create an empty subdirectory to store files.

Possible Errors

1. There are already files or subdirectories on the disk with the same name as the specified subdirectory;

Tip: Directory already exists

2. Specify the subdirectory name and the device name of DOS
;

Tip: Unable to create directory

3. The disk space is full (all disk space is full) All are prompted for this, no longer repeated);

Tip: InsufficIEnt disk space

4. The floppy disk is write protected or incorrect (in this case, press the "A" key to display the command prompt. Any floppy disk or CD is missing, can not be written but written, serious physical or logical errors are prompted for this, no longer repeated).

Tip: Write protect error reading drive A

Abort, Retry, Fail?

Explanation: Each 3 inch floppy disk has a top right corner that can move up and down. The small square is called the write protection port. As long as it is turned on, the disk cannot be written, and files and directories cannot be created, changed, or deleted. This is a good way to prevent accidents. The hard disk does not have a write protection port, and the disc cannot be written.

5. Missing parameters (all parameters are missing for this prompt, no longer repeated);

Tip: Required parameter missing

6. More than one parameter (every parameter Too many are prompted for this, no longer repeated).

Tip: Too many parameters - redundant parameter name

Alternative operations in Windows

1. 3.x: Select "File Manager" under the "File" menu "Create Directory" item;

2. 9x or NT: Select the "Folder" subkey of the "New" item under the "File" menu in "Explorer".
RD Command--Delete Empty Subdirectory Command

Command Format RD Empty Subdirectory Name

Switch None

Function Remove an empty subdirectory from the disk.

Possible error

1. The specified empty subdirectory name does not exist;

2. The specified subdirectory is not an empty subdirectory, and there is a subdirectory and File;

Tip: Invalid path, not directory,

or directory not empty

Alternative operations in Windows None
CD command--Set and view default Directory Command

Command Format CD [Subdirectory Name]

Description: When the parameter in the command is marked with "[]", it means that this parameter can be omitted. Otherwise, it cannot be added.

Switch None

Function When there is no parameter, DOS
will give the default directory. When there are parameters, DOS
will set the specified subdirectory as the default directory of the system. "CD.." means that the upper directory of the current directory is set as the default directory of the system, and "CD\\" means that the root directory of the current disk is set as the default directory of the system. DOS
will automatically set the boot disk root directory to the default directory at boot time.

Possible error

1. The specified directory name does not exist;

2. The current directory is already the root directory, but the "CD.." command is still used; Br>

Tip: Invalid directory

Possible confusion

Q: The current directory is "C:\\Windows" and there is no error after using the command "CD D:\\W" , D disk root directory does have W subdirectory, how is the current directory or "C:\\Windows"?

Answer: The CD command cannot change the current disk. You must use a "D:" command to set the D disk as the current disk. "D:\\W" will become the current directory.

Alternative Operations in Windows

1. 3.x: Start the "File Manager" and use the mouse to move the light bar to the specified directory;

2. 9x or NT: Start the "Explorer" and use the mouse to move the light bar to the specified directory. In the Windows 9x system, the concept of "current directory" has been diluted.




Chapter 3 File Management

Section 2 Management Directory DOS< Br>External Commands

The DOS
external commands discussed in this column refer to the external commands that come with the latest version of the DOS
system, rather than the user-developed DOS
External commands. I don't distinguish between different versions of DOS
, because the number of DOS
users in the lower version is basically 0. Only DOS
6.22 and above are discussed here. . To run the external command of DOS
, you must have the corresponding executable file support, otherwise it will be considered illegal. "/?" This help switch is fully supported in all DOS
internal commands and DOS
native commands, but user-developed DOS
external The command does not necessarily provide this convenience.
TREE Command - View Tree Structure Command

Command Format TREE [Subdirectory Name]

Switch

1. /F: Even files are displayed together;

2. /A: Use ASCII instead of tabs, what do you mean by one?

Function The system uses the specified subdirectory as a trunk to display the entire tree structure stored under it. If not specified, the current directory is the default parameter.

Possible error

1. The specified directory name does not exist;

Tip: Invalid path- Illegal directory path

2. Switch error (every switch The error is prompted for this and will not be repeated).

Tip: Invalid switch- illegal switch


Alternative operations in Windows

1. 3.x: Start "File Manager", automatically Display all tree structure;

2. 9x or NT: Start "Explorer", automatically display all tree structure, use the mouse to change "+" to "-" to browse a branch Or, conversely, cancel the browsing of a branch.
DELTREE Command - Delete Branch Command

Command Format DELTREE Subdirectory Name

Switch /Y: Delete without warning.

Description: This switch is special, it should be placed before the parameter, otherwise it is invalid.

Function Deletes the specified subdirectory and the entire tree structure with it as the trunk, regardless of the properties of the file under it. The function is very powerful, but it must be used with caution!

may erroneously specified directory does not exist;

Tip: do not give any hints;

Windows alternative operating in

1. 3.x: Start the "File Manager", move the light bar to the subdirectory you want to delete, press the "Delete" button and confirm;

2. 9x or NT: Start "Explorer" , Move the light bar to the folder you want to delete, press the “Shift+Delete” button and confirm. In the Windows system, regardless of whether the folder is empty or not, the operation of deleting the subdirectory is not available.
MOVE Command - Directory Rename Command

Command Format MOVE Atomic Directory Name Subdirectory Name after Rename

Switch /Y: Rename without warning.

Description: This switch is special, it should be placed before the parameter, otherwise it is invalid.

Function Renames a subdirectory. The MOVE command also has the function of moving files, which will be introduced later.

The original directory name that may be incorrectly specified does not exist;

Tip: Cannot move Illegal original directory name - No such file or directory

Alternative operations in Windows

1. 3.x: Start the "File Manager", move the light bar to the subdirectory to be renamed, select
in the "File" menu.

Copyright © Windows knowledge All Rights Reserved