Complete doscommand set (1)

Source: Internet
Author: User

1) MD -- create sub-Directories

1. function: Create a New subdirectory

2. Type: Internal commands

3. Format: MD [drive letter:] [path name] <subdirectory Name> 〉

4. Instructions for use:

(1) "drive letter": Specifies the disk drive letter of the subdirectory to be created. If omitted, it is the current drive;

(2) "path name": the parent directory name of the subdirectory to be created. If it is set to the current directory by default.

Example: (1) create a sub-directory named Fox under the root directory of drive C; (2) create a sub-directory named user under the sub-directory of drive C.

C:,> MD Fox (create the sub-directory Fox under drive C)

C:,> MD Fox, user (create a user sub-directory under the fox sub-directory)

(2) Cd-change the current directory

1. function: display the current directory

2. Type: Internal commands

3. Format: CD [drive letter:] [path name] [subdirectory name]

4. Instructions for use:

(1) If the path and subdirectory names are omitted, the current directory is displayed;

(2) If the "cd" format is used, it will be returned to the root directory;

(3) "CD .." The format is returned to the upper-level directory.

Example: (1) enter the user sub-directory; (2) return from the user sub-directory to the sub-directory; (3) return to the root directory.

C:,> Cd Fox, user (enter the user sub-directory under the fox sub-directory)

C:, Fox, user> Cd .. (Return to the root directory of the previous level)

C:, Fox> Cd, (return to the root directory)

C:,>

(3) RD -- delete sub-directory command

1. function: the directory is deleted from the specified disk.

2. Type: Internal commands

3. Format: RD [drive letter:] [path name] [subdirectory name]

4. Instructions for use:

(1) The subdirectory must be empty before deletion. That is to say, you must first enter the subdirectory and use del to delete the files in 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.

For example, you must delete the user sub-directory under the fox sub-directory of drive C as follows:

Step 1: First delete the files in the user sub-directory;

C.> del C:, Fox, user ,*. *

Step 2: delete the sub-directory of user.

C.> rd c:, Fox, user

(4) dir -- display disk directory command

1. function: display the contents of the disk directory.

2. Type: Internal commands

3. Format: dir [drive letter] [path] [/P] [/W]

4. instructions for use:/P. When there are too many directories to be viewed, the screen cannot be displayed on a screen and will always be rolled up, which is not easy to see. After adding the/p parameter, on the screen, 23 lines of file information are displayed separately, paused, and displayed. Press any key to continue

/W: Add/W to display only the file name. The file size and creation date and time are ignored. After the parameter is added, five file names can be displayed in each line.

:] [Path 2]… (Set the search path for executable files)

Path: (cancel all paths)

Path: (display the current path)

(6) tree-command for displaying the disk directory structure

1. function: Display All directory paths on the specified drive and all file names under these directories.

2. Type: External commands

3. Format: Tree [drive letter:] [/F] ["PRN]

4. Instructions for use:

(1) When the/F parameter is used, all directories and all files under the directories are displayed. When omitted, only directories are displayed, but files under the directories are not displayed;

(2) When the PRN parameter is selected, the file names in the listed directories and directories are printed and output.

(7) deltree -- delete the entire directory command

1. function: Delete the entire directory and its sub-directories and files.

2. Type: External commands

3. Format: deltree [drive letter:] <Path Name> 〉

4. instructions for use: This command can delete all the files, subdirectories, and lower-level subdirectories in the directory and Its Directory, regardless of whether the file attributes are hidden, system, or read-only, as long as the file is under the deleted directory, the deltree will be treated equally. Be careful when using it !!!

V. Disk operation commands

(1) format -- disk formatting command

1. function: format the disk, divide the magnetic channels and sectors, and check whether there are any defective tracks on the entire disk, mark the bad channels, and create a directory area and file allocation table, prepare the disk for DOS reception.

2. Type: External commands

3. Format: Format <drive letter:> [/S] [/4] [/q]

4. Instructions for use:

(1) The drive letter after the command cannot be default. If you format the hard disk, the following prompt will be displayed: Warning: all data on non -- removable disk

Drive C: Will be lost!

Proceed with format (y/n )?

(Warning: all data on drive C will be lost. Are you sure you want to continue formatting ?)

(2) If a floppy disk is formatted, the following prompt is displayed: insert mew diskette for drive;

And press Enter when ready...

(Insert a new disk into drive a, and press the Enter key after preparation ).

(3) When the [/S] parameter is selected, the DOS system file IO. sys, msdos. sys, and command. com will be copied to the disk so that the disk can be used as a DOS boot disk. If the/S parameter is not selected, the formatted ephemeral disk can only read and write information, but cannot be used as the boot disk;

(4) Select the [/4] parameter to format A kb low-density disk in a MB high-density soft drive;

(5) use the [/q] parameter for quick formatting. This parameter does not redivide the disk's magnetic track and fan area. You can only clear the disk root directory, file allocation table, and boot sector to a blank space, therefore, the formatting speed is faster.

(6) Select the [/u] parameter, indicating unconditional formatting, that is, destroying all data on the original disk. If/u is not added, it is formatted securely. In this case, create a mirror file to save the original fat table and root directory. If necessary, use unforrmat to restore the original data.

(2) unformat restore formatting command

1. function: restore a disk that has lost data due to formatting or misoperations.

2. Type: External commands

3. Format: unformat <drive letter> [/L] [/u] [/P] [/test]

4. Instructions for use: Used to restore a disk that is "non-destructive" format. When the deleted files or subdirectories under the root directory and the system sector of the disk (including fat, root directory, Boot Sector, and hard disk partition table) are damaged, unformat can also be used for rescue.

(1) Select the/L parameter to list the found sub-directory name, file name, filial piety date and other information, but it does not really do the format work.

(2) Select the/p parameter to display the Report on the screen (including the information generated by the/L parameter) and send it to the printer. "Print out will be sent to LPT1" will be displayed on the runtime Screen"

(3) The/test parameter is used only for the simulation test without the real write action. When this parameter is used, the screen displays "simulation only"

(4) use the/u parameter to unformat data that does not use the mirror image file.

(5) Select/psrtn to fix the hard disk partition table.

If one of the/P,/L, And/test parameters is added after the drive letter, the/u parameter is used. unformat will "assume" that the disk does not have the mirror image file.

Note: unformat can be completely restored for the disk that just formatted. However, if other data is written after format, unformat cannot be completely recovered. Unformat is not omnipotent. Because unformat is used to recreate the fat and root directories, it is also highly risky. Improper Operations may increase the loss, if only several files or subdirectories are deleted by mistake, you only need to use undelete.

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.