中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 09:36
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Methods of Using DOS
Printable Version  1,716 / 1
Floor1 枯井无波 Posted 2004-03-11 00:00
初级用户 Posts 10 Credits 146
To operate and use DOS, it is very important to know some common commands. The following are the usages of some commands.

A file name is composed of a file path and a file name, for example, C:\DOS\COMMAND.COM.

DIR displays files and folders (directories).
Usage: DIR

It has many options, such as /A to display all files (that is, including files with hidden and system attributes), /S to also display files in subfolders, /P to display page by page, /B to only display file names, etc.
For example, DIR A*.EXE /A /P
This command displays page by page all files (folders) starting with A and with the suffix EXE in the current folder.

CD or CHDIR changes the current folder.
Usage: CD
If there is no folder name, it displays the current path.

MD or MKDIR creates a folder.
Usage: MD folder name

RD or RMDIR deletes a folder.
Usage: RD folder name
Note: This folder must be empty.

DEL or ERASE deletes a file.
Usage: DEL/ERASE file name

COPY copies a file.
Usage: COPY file name 1
For example, COPY /B A+B C
This command combines two binary files A and B into one file C.

TYPE displays the content of a file.
Usage: TYPE file name

REN or RENAME changes the file name, and in DOS7, it can also change the folder name.
Usage: REN file (folder) name 1 file (folder) name 2

EDIT edits a file, and in DOS7, it can also edit binary files.
Usage: EDIT
For example, EDIT /70 C:\COMMAND.COM
This command edits the C:\COMMAND.COM file in binary mode.

FORMAT formats a disk.
Usage: FORMAT drive

It has many options, such as /Q for quick format, /U for unconditional format (that is, cannot be restored using commands like UNFORMAT, etc.), /V to specify the volume label name of the disk, etc. It also has many undocumented parameters.

MEM displays the memory status.
Usage: MEM

Its options also have quite a few, such as /C to list the memory usage of all programs, /D to display detailed information such as the status of resident programs and device drivers, /F to display the total amount of free memory, /M to display module information in memory, /P to display page by page. There is also a hidden /A option, which can display HMA information.

MOVE moves a file or folder, and can also change the name of a file or folder.
Usage: MOVE file 1 file 2
For example, MOVE C:\*.EXE D:
This command can move all files with the extension EXE in the root folder of drive C to drive D.

XCOPY copies a file or folder.
Usage: XCOPY file name 1 name 2]

Its options are very many, such as /S to copy all files in a folder (including subfolders), /E to specify including empty folders, /V to check the correctness of the copied files after copying, /Y to confirm, etc.

CLS clears the screen.
Usage: CLS

SYS transmits the system, that is, transmits system files (such as IO.SYS, etc.) from one place to a specified drive.
Usage: SYS folder name
For example, SYS C:\DOS A:
This command can transmit the system files located in the C:\DOS folder to drive A.

DATE displays or sets the date.
Usage: DATE

TIME displays or sets the time.
Usage: TIME

DOS also comes with some other commands, such as SORT (sorting), FIND (finding characters), etc.
Floor2 doscommand Posted 2004-03-12 00:00
银牌会员 Posts 148 Credits 1,141
The following is the speech quoted by Kujing Wubo on 2004-3-11 17:44:00:
To operate and use DOS, it is very important to know some common commands. The following are the usages of some commands.

The file name is composed of the file path and the file name, such as C:\DOS\COMMAND.COM.

DIR displays files and folders (directories).
Usage: DIR

It has many options, such as /A to display all files (that is, including files with hidden and system attributes), /S to also display files in subfolders, /P to display in pages, /B to only display file names, and so on. For example, DIR A*.EXE /A /P
This command displays all files (folders) starting with A and with the suffix EXE in the current folder in pages.

CD or CHDIR changes the current folder.
Usage: CD
If there is no folder name, it displays the current path.

MD or MKDIR creates a folder.
Usage: MD folder name

RD or RMDIR deletes a folder.
Usage: RD folder name
Note: This folder must be empty.

DEL or ERASE deletes a file.
Usage: DEL/ERASE file name

COPY copies files.
Usage: COPY file name 1
For example, COPY /B A+B C
This command combines two binary files A and B into one file C.

TYPE displays the content of a file.
Usage: TYPE file name

REN or RENAME changes the file name. In DOS7, it can also change the folder name.
Usage: REN file (folder) name 1 file (folder) name 2

EDIT edits a file. In DOS7, it can also edit binary files.
Usage: EDIT
For example, EDIT /70 C:\COMMAND.COM
This command edits the C:\COMMAND.COM file in binary mode.

FORMAT formats a disk.
Usage: FORMAT drive

It has many options, such as /Q for quick format, /U for unconditional format (that is, cannot be restored using commands like UNFORMAT), /V to specify the volume label of the disk, and so on. It also has many undocumented parameters.

MEM displays the memory status.
Usage: MEM

It also has quite a few options, such as /C to list the memory usage of all programs, /D to display detailed information about resident programs and device drivers, /F to display the total amount of free memory, /M to display module information in memory, /P to display in pages. There is also the hidden /A option, which can display HMA information.

MOVE moves files or folders, and can also change the name of files or folders.
Usage: MOVE file 1 file 2
For example, MOVE C:\*.EXE D:
This command can move all files with the extension EXE in the root folder of drive C to drive D.

XCOPY copies files or folders.
Usage: XCOPY file name 1 name 2]

It has very many options, such as /S to copy all files in the folder (including subfolders), /E to specify including empty folders, /V to verify the correctness of the copied files after copying, /Y to confirm, and so on.

CLS clears the screen.
Usage: CLS

SYS transfers the system, that is, transfers system files (such as IO.SYS, etc.) from one place to the specified drive.
Usage: SYS folder name
For example, SYS C:\DOS A:
This command can transfer the system files located in the C:\DOS folder to drive A.

DATE displays or sets the date.
Usage: DATE

TIME displays or sets the time.
Usage: TIME

DOS also comes with some other commands, such as SORT (sorting), FIND (finding characters), etc.


Hostname: displays the name of the computer.

IPconfig: displays the IP address, and can use IPCONFIG /? for assistance.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023