Included "frequently-used DOS commands in Windows"

Source: Internet
Author: User

 
Common doscommands in Windows
Prepared by: enet college straw flying Source: enet

Our commonly used operating systems include Windows 9x/Me, Windows XP, Windows NT, and Windows 2000, which are visualized interfaces. Here, commands in the DOS system are rarely used,

It's not useless. Many experts prefer to use dos for basic operations. Here I will introduce the commonly used doscommands.
There are about one hundred doscommands (including text editing, virus scanning, configuration files, and batch processing) in total. Here we will detail the commonly used doscommands.
1. dir
DIR is the abbreviation of directory, which is used to display files and subdirectories in a directory. [Function] displays information about files and subdirectories in a specified disk or directory, including files and sub-directories.

Record the volume label of the disk, the name of the file and subdirectory, the size of each file, and the date and time when the file and directory were created, and the number of file subdirectories, the total number of bytes occupied, and the total space remaining on the disk.

.
[Format] dir [C:] [path] [filename] [. Ext] [/o] [/S] [/P] [/W] [/A]
[Note] DIR is one of the most commonly used doscommands. A slash indicates that the following content is a parameter. DoS parameters are commonly used in the following four scenarios:

Parameter
Yi

/P
When the display information is full, the display is paused. Press any key to display the next screen.

/O
Sort display. O can be followed by letters of different meanings

/W
Only the directory name of the file name is displayed, with five file names in each row. That is, Wide Row display

/S
Display All directory files in directories and subdirectories
2. md

MD is the abbreviation of make directory.

[Function] create a sub-directory

[Format] MD [C:] path

[Example] using MD to create a directory called purple

3. CD

CD is the abbreviation of Change directory.

[Function] changing or displaying the current directory

[Format] CD [C:] [path]

[Description] Two Types of paths are available: absolute path and relative path. If there is only CD but no parameter, only the current path is displayed. Note: Each subdirectory must have two "Special directories", namely "." and "..", one of which indicates

The current directory. Two points indicate the previous directory. From a simple and practical perspective, we can solve all the problems by learning to enter (a directory name under the CD layer) and exit (CD ..) layer by layer. Of course.

Use an absolute path.

[Example] Go to the purple directory we just created

4. Rd

Remove directory -- delete a directory

[Function] deletes an empty sub-directory.

[Format] RD [D:] path

[Note] RD is a command used to delete empty sub-directories. Note: You cannot delete a non-empty directory or the current directory.

[Example] Use rd to delete the purple directory

Next we will use the MD, CD, and RD commands.
5. Copy

Copy means copying in English.

[Function] copies one or more files to a specified disk or directory.

[Format] Copy [C:] [path] [filename. Ext] [C:] [path] filename. ext

[Description] The basic usage of the copy file command is: "copy the source file name target file name ". If you only write the target path without writing the target file name, it indicates copying with the same name; otherwise, it is called renaming. Note: replace one

Do not change the file extension.

[Example] to copy all files in the C: \ purple directory to a floppy disk, run the following command. Note that the current disk is different from the current path:

C: \> copy purple :\

If a file with the same name already exists on the target disk, the following message is displayed: "overwrite xxxx (Yes/No/All)". Then, if you answer y, the current file is overwritten, and N is retained, A will overwrite all subsequent documents without asking questions.

6. DEL

Del is the abbreviation of Delete.

[Function] deletes one or more files from a specified disk or directory.

[Format] del [C:] [path] filename. ext

[Note] This command should be used with caution. Once deleted, it will not be easy to restore. You can also use wildcards to delete a type of files. When *. * is used, a warning will be given for security purposes, and the confirmation party will delete the work. Delete

If no message is displayed during the operation, the operation is deleted correctly.

Note that this command cannot delete files with read-only, implicit, and system attributes. If the specified file does not exist, the message "file not found" is displayed. Dos can use undelete to delete accidentally deleted files.

Command to restore; it can only delete files, not directories.

7. Ren

Rename is short for rename.

[Function] changes the name of a file or a group of files in a specified disk or directory.

[Format] Ren [C:] [path] filename1 [. Ext] filename2 [. Ext]

[Note] the renaming operation is only limited to the names of a group of files in a file. It does not change the directory where the files are located. If a wildcard is used, rename a batch of files.
8. Type

[Function] command for displaying text files on the screen

[Format] type [C:] [path] filename. ext

[Note] the type command is used to quickly and easily display the content of a text file on the screen. A file with the extension of txt is a text file. If you use this command to display files with an extension of EXE or com, enter

The output result is often a mess of symbols accompanied by irregular bells, and sometimes even crashes.

9. Format

[Function] disk formatting

[Format] [C:] [path] format drive: [/S]

[Note] various disks manufactured by the manufacturer can be used to store files in various operating systems. The disk formats of different operating systems are generally different and are not universal. The format command is used to make a new disk

Recognized by the DOS operating system to store DoS Files.

This command is actually used to plan the disk in the information storage format specified by DOS. When formatting a disk, you must clear all existing data on the disk.

Write the Boot Record and divide the File Allocation Table and root directory. At the same time, it also finds all bad sectors on the disk and marks them as unavailable. Here, we only list one command parameter:/s. When this

After parameters, the disk is formatted and mounted to the operating system file to convert it into a boot disk. It is equivalent to format and then run the following command: SYS.

10. discopy

Diskcopy.

[Function] copies a disk with the same content as the original disk.

[Format] diskcopy source drive name destination drive name

[Note] its main purpose is to back up data. For example, when our computer was just purchased, some device drivers were randomly attached.ProgramDisks. These drivers may be used in the future.

Otherwise, you must back up all of them. In this case, the diskcopy command is quick and convenient.
11. deltree

[Function] deletes a directory tree.

[Format] [C:] [path] deltree [C1:] [path1] [C2:] [path2] […]

[Note] This command eliminates the entire specified directory tree, regardless of whether it is read-only or hidden. Be especially careful when using it. It is a dangerous command.

12. mem

Mem is short for memory

[Function] This command is used to view the memory size of your computer and the memory usage.

[Format] directly type the mem command

13. chkdsk

Chkdsk is short for check disk.

[Function] is used to check the usage of your disk.

[Format] chkdsk disk name

[Note] For example, to check disk A usage, enter chkdsk A: To check disk C usage, enter chkdsk C:. If you directly enter chkdsk, check the usage of the current disk.

14. sys

[Function] Transfers System File commands. Transmit the two implicit dos systems Io. sys and msdos. sys to a specific location on the target disk and copy the command. com file. After completion

The SD disk becomes the DOS boot disk.

[Format] [C:] [path] sys [C1:] [path] D2:

[Note] because these files need to be copied to a specific location, the copy command may not be able to start the machine. Through the Sys command, DOS can move files in a specified location on the target disk

And copy the system file to the corresponding location. The C1: path parameter specifies the directory where the system file is located. If this parameter is not specified, the current directory of the current disk is used by default. Therefore, this command must be run in the root directory of the source disk.

Line.
15. Path

[Function] sets the directory where dos searches for. com,. EXE, And. BAT files.

[Format] Path = [[drive:] path [;…] Or path

[Description] Only environment variable content is displayed when path is used and no parameter is set. If there is a parameter, reset the PATH variable. When the path environment variable is not specified, the user-issued command, DOS first determines whether it is internal

Command, and then find whether the main file name in the current directory is the executable file of the command. If not, the information "Bad command or FILENAME" is displayed ". If the specified path command is issued

Find the path in sequence. If the path is still not found, the above prompt is displayed.

16. Edit

[Function] the edit command is a simple editing software, which is often used to edit programs and batch files.

17. CLs

[Function] clears the content on the display screen and enables the DOS prompt to go to the upper left corner of the screen.

[Format] CLS

18. Time

[Function] displays and sets the DOS system time.

[Format] time [HH [: Mm [: ss [. CC]

19. Date

[Function] displays and sets the DOS system date.

Date [MM-DD-YY] [format]

20. Ver

[Function] displays the running DOS system version number.

[Format] ver
6. other commonly used doscommands


Command function

Attrib sets file attributes

Ctty Change Control Device

Defrag disk Fragment

Doskey calls and creates dos macro commands

Debug program debugging command

Emm386 extended memory management

FC file comparison

Fdisk hard disk partition
LH/loadhigh load the program into high-end memory

Move the file and change the directory name

More split-screen display

Prompt setup prompt

Set Environment Variables

Smartdrv sets the disk accelerator

Setver version

SUBST path replacement

Vol: displays the specified disk volume number.

Xcopy copy directories and files

The commonly used doscommand is here. To become a computer master, it is very necessary to use the doscommand skillfully.

Related Article

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.