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.
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.

