MS-DOS System Commands and Batch Command Directory
MS-DOS is the abbreviation of Microsoft Disk Operating System, that is, the disk operating system provided by Microsoft Corporation of the United States. Before Windows 95, DOS was the most basic configuration of PC-compatible computers, and MS-DOS was the most commonly used PC-compatible DOS.
The most basic MS-DOS system consists of a MBR-based BOOT boot program and three file modules. These three modules are the input and output module (IO.SYS), the file management module (MSDOS.SYS), and the command interpreter module (COMMAND.COM).
In addition, Microsoft also added several standard external programs (that is, external commands) to the retail MS-DOS system package, which, together with internal commands (that is, commands interpreted and executed by COMMAND.COM), form a relatively complete man-machine interaction environment in the disk operation era.
MS-DOS generally uses a command line interface to accept user instructions. However, in later MS-DOS versions, DOS programs can also enter a graphical mode by calling the corresponding DOS interrupts, that is, graphical interface programs under DOS.
DOS Command Conventions:
Character Convention
Letter A letter is text that must be entered exactly as it is, and can be in uppercase or lowercase.
[ ] Indicates that the content in the brackets is optional, but the content outside the brackets is required.
| Indicates two mutually exclusive options. That is, only one of the two items can be selected for use.
… Indicates that the parameter before it can be repeated any number of times. For example: file spec … means the user can enter one or several file names.
DOS Command List:
Command Function
APPEND Allows a program to access files in a specified directory as if these files were in the current directory.
ATTRIB Display and change the attributes of files and directories or clear all attributes.
BREAK Control extended interrupt checking.
BUFFERS Specify the number of disk buffers.
CALL Call a second batch program without aborting the first batch program.
CD Change or display the default directory.
CHCP Change the code page of all devices or display the number of the current code page.
CHDIR (See CD).
CHKDSK Report the disk status, report and correct errors in the FAT and directory structure, and report file fragmentation.
CHOICE Allows the user to make a choice during the running of a batch program.
CLS Clear the screen display.
COMMAND Start a new version of the DOS command interpreter COMMAND.COM.
COMP Compare two or groups of files.
COPY Copy one or more files and concatenate files.
COUNTRY Specify a country's format for date and time display, currency symbols, sorting, punctuation, number separators, and codes.
CTTY Change the console device.
DATE Display and allow modification of the system date.
DBLSPACE Compress hard disks or floppy disks and manage compressed disks.
DEBUG Start a program that can be used to test and debug executable files.
DEFRAG Reorganize files on the drive to improve file access performance and sort directory entries.
DEL Delete one or a group of files.
DELOLDOS Delete the old version of DOS from the drive.
DELTREE Delete a directory and all its files and subdirectories, and delete files in the directory.
DEVICE Load a device driver into conventional memory.
DEVICEHIGH Load a device driver into the upper memory if possible.
DIR List and display files and subdirectories in a directory.
DISKCOMP Compare two floppy disks.
DISKCOPY Copy one disk to another.
DOS Load DOS into the high memory block (HMA) and specify that DOS manages the upper memory block (UMB).
DOSKEY Save and reuse command macros entered at the DOS command prompt.
DOSSHELL Start the DOS Shell-DOS graphical interface.
DRIVPARM Redefine the parameters of a physical drive.
DRVSPACE Compress hard disks or floppy disks; manage compressed disks.
ECHO Turn on or off the echo function of commands or display a message.
EDIT Start the DOS Editor, which is used to create or modify ASCII text files.
EMM386 Control expanded memory (expanded memory)
ERASE (See DEL).
EXIT Exit the secondary command processor.
EXPAND Expand files on the DOS installation disk.
FASTHELP Provide on-screen help information for DOS commands or list all commands.
FASTOPEN Start FASTOPEN to make the speed of opening commonly used files faster.
FC Compare two files and display the lines or bytes that do not match.
FCBS Allocate file control blocks (FCB).
FDISK Start the DISK program to create partitions for hard disks using DOS and display the hard disk status.
FILES Set the number of files that DOS can access when using file handles to access files.
FIND Search for specified text strings in one or a group of files and display the lines containing them.
FOR Repeat a command for each item in a set.
FORMAT Make a disk usable or reusable.
GOTO Used in batch programs to make DOS go to the line with the specified label.
GRAPHICS Load the GRAPHICS memory-resident program (TSR) so that DOS can print graphics on the screen.
HELP Start the DOS command help program.
IF Implement conditional processing in batch programs.
INCLUDE Used in CONFIG.SYS to include the content of a system setting block here.
INSTALL Load TSR in CONFIG.SYS.
INTERLNK Complete the INTERLNK connection between client and server computers. Redirect the server.
INTERSVR Load the INTERLNK server software and redirect drive and printer ports. Copy the INTERLNK file from one computer to another.
KEYB Load KEYB TSR so that users can use non-standard keyboard layouts.
LABEL Display and change the disk volume label.
LASTDRIVE Specify the highest drive letter, which also specifies the maximum number of drives that the system can access.
LH Load the program into the specified area of the upper memory.
LOADFIX Load the running program in the space above the first 64KB.
LOADHIGH (See LH).
MD Create a new directory. Can be used interchangeably with MKDIR.
MEM Display the current memory usage.
MEMMAKER Move device drivers and TSR to upper memory to optimize memory usage.
MENUCOLOR Set the color of the startup menu.
MENUDEFAULT Specify the default menu item for the CONFIG.SYS startup menu and set the timeout value.
MENUIEM Define a menu item in the startup menu of CONFIG.SYS.
MKDIR (See MD).
MODE Configure the system device.
MORE Display the output of files or programs, and pause after each screen is displayed.
MOVE Move one or more files to other locations. Change the file or directory name.
MSAV Search for viruses in memory and on disks, and remove them when found.
MSBACKUP Backup and restore data on the computer.
MSCDEX Enable DOS to use CD-ROM drives.
MSD Display or report technical information about the computer.
NLSFUNC Start a program to load country-related information to support a certain language.
NUMLOCK Specify the initialization state of the number lock (Numlock) on the numeric keypad to be on or off.
PATH Define the search path for external executable files (including batch files).
PAUSE Temporarily suspend the execution in the batch program and prompt the user to press any key to continue.
POWER In laptops, reduce power consumption when applications and devices are idle.
PRINT Manage background printing.
PROMPT Change the command prompt.
QBASIC Start the QBASIC programming environment, allowing the writing, testing, and running of QBASIC programs.
RD Delete a directory.
REM Add comments in batch files or CONFIG.SYS.
REN Change one or more file names.
RENAME (See REN).
REPLACE Replace or add files from one directory to another.
RESTORE Restore files backed up by the BACKUP command of previous DOS versions (DOS 2.0 to 5.0).
RMDIR (See RD).
SCANDISK Detect and correct problems existing in the drive.
SET Set or change the value of an environment variable, or display the current value.
SETUP Install DOS from a floppy disk.
SETVER Set the version number that DOS reports to programs or device drivers. Display the version table.
SHARE Load SHARE TSR, which is used to install file sharing and locking functions for disk or network drives.
SHELL Specify the command interpreter for DOS.
SHIFT Shift the command line parameters passed to the batch file to the left.
SMARTDRV Start or set SmartDrive, which uses extended memory (extended memory) to generate disk buffers. Write buffered data.
SORT Sort the order of ASCII data and display the result.
STACKS Support the use of data stacks to handle hardware interrupts.
SUBMENU Define an item in the startup menu, and another set of options will appear when this item is selected.
SUBST Reassign a drive letter to represent a path.
SWITCHES Provide special options for several features of DOS.
SYS Copy DOS system files and the command interpreter to a formatted disk to make it a bootable disk.
TIME Display and allow modification of the system time.
TREE Display the directory structure in a graphical way.
TRUENAME Display the true location of a directory or file.
TYPE Display the content of a file.
UNDELETE Allow deletion protection or restore deleted files.
UNFORMAT Restore a disk that has been reformatted by the FORMAT command.
VER Display the DOS version number.
VERIFY Turn on or off write verification.
VOL Display the disk volume label and serial number.
VSAFE Load or remove VSAFE TSR, which is used to continuously monitor the computer to prevent operations that may be caused by viruses.
XCOPY Copy files and subdirectories.
DOS Device Drivers:
Command Function
ANSI.SYS Provide functions to control screen color, cursor position, and keyboard definition.
CHKSTATE.SYS Used by the MEMMAKER command to control the optimization process.
DBLSPACE.SYS Move DBLSPACE.BIN to an appropriate location in memory.
DISPLAVY.SYS Support the switching of screen and keyboard code pages.
DRIVER.SYS Generate a logical drive and assign it to a floppy drive.
DRVSPACE.SYS Move DRVSPACE.BIN to an appropriate location in memory.
EGA.SYS Used to save and restore the display when using the task switching program of the DOS Shell on an EGA monitor.
EMM386.EXE Provide access to the upper memory area, using extended memory (extended memory) to simulate expanded memory (expanded memory).
HIMEM.SYS Manage extended memory, including the high memory area (HMA).
INTERLNK.EXE Connect the client computer to the server computer and redirect drive and printer port names.
POWER.EXE In laptops, reduce power consumption when applications and devices are idle.
RAMDRIVE.SYS Use a part of the computer's random access memory (RAM) to simulate a hard disk drive.
SETVER.EXE Load the DOS version table into memory.
SMARTDRV.EXE Provide compatibility for hard disk controllers that cannot work on the memory provided by EMM386.EXE or Windows running in 386 enhanced mode.
MS-DOS is the abbreviation of Microsoft Disk Operating System, that is, the disk operating system provided by Microsoft Corporation of the United States. Before Windows 95, DOS was the most basic configuration of PC-compatible computers, and MS-DOS was the most commonly used PC-compatible DOS.
The most basic MS-DOS system consists of a MBR-based BOOT boot program and three file modules. These three modules are the input and output module (IO.SYS), the file management module (MSDOS.SYS), and the command interpreter module (COMMAND.COM).
In addition, Microsoft also added several standard external programs (that is, external commands) to the retail MS-DOS system package, which, together with internal commands (that is, commands interpreted and executed by COMMAND.COM), form a relatively complete man-machine interaction environment in the disk operation era.
MS-DOS generally uses a command line interface to accept user instructions. However, in later MS-DOS versions, DOS programs can also enter a graphical mode by calling the corresponding DOS interrupts, that is, graphical interface programs under DOS.
DOS Command Conventions:
Character Convention
Letter A letter is text that must be entered exactly as it is, and can be in uppercase or lowercase.
[ ] Indicates that the content in the brackets is optional, but the content outside the brackets is required.
| Indicates two mutually exclusive options. That is, only one of the two items can be selected for use.
… Indicates that the parameter before it can be repeated any number of times. For example: file spec … means the user can enter one or several file names.
DOS Command List:
Command Function
APPEND Allows a program to access files in a specified directory as if these files were in the current directory.
ATTRIB Display and change the attributes of files and directories or clear all attributes.
BREAK Control extended interrupt checking.
BUFFERS Specify the number of disk buffers.
CALL Call a second batch program without aborting the first batch program.
CD Change or display the default directory.
CHCP Change the code page of all devices or display the number of the current code page.
CHDIR (See CD).
CHKDSK Report the disk status, report and correct errors in the FAT and directory structure, and report file fragmentation.
CHOICE Allows the user to make a choice during the running of a batch program.
CLS Clear the screen display.
COMMAND Start a new version of the DOS command interpreter COMMAND.COM.
COMP Compare two or groups of files.
COPY Copy one or more files and concatenate files.
COUNTRY Specify a country's format for date and time display, currency symbols, sorting, punctuation, number separators, and codes.
CTTY Change the console device.
DATE Display and allow modification of the system date.
DBLSPACE Compress hard disks or floppy disks and manage compressed disks.
DEBUG Start a program that can be used to test and debug executable files.
DEFRAG Reorganize files on the drive to improve file access performance and sort directory entries.
DEL Delete one or a group of files.
DELOLDOS Delete the old version of DOS from the drive.
DELTREE Delete a directory and all its files and subdirectories, and delete files in the directory.
DEVICE Load a device driver into conventional memory.
DEVICEHIGH Load a device driver into the upper memory if possible.
DIR List and display files and subdirectories in a directory.
DISKCOMP Compare two floppy disks.
DISKCOPY Copy one disk to another.
DOS Load DOS into the high memory block (HMA) and specify that DOS manages the upper memory block (UMB).
DOSKEY Save and reuse command macros entered at the DOS command prompt.
DOSSHELL Start the DOS Shell-DOS graphical interface.
DRIVPARM Redefine the parameters of a physical drive.
DRVSPACE Compress hard disks or floppy disks; manage compressed disks.
ECHO Turn on or off the echo function of commands or display a message.
EDIT Start the DOS Editor, which is used to create or modify ASCII text files.
EMM386 Control expanded memory (expanded memory)
ERASE (See DEL).
EXIT Exit the secondary command processor.
EXPAND Expand files on the DOS installation disk.
FASTHELP Provide on-screen help information for DOS commands or list all commands.
FASTOPEN Start FASTOPEN to make the speed of opening commonly used files faster.
FC Compare two files and display the lines or bytes that do not match.
FCBS Allocate file control blocks (FCB).
FDISK Start the DISK program to create partitions for hard disks using DOS and display the hard disk status.
FILES Set the number of files that DOS can access when using file handles to access files.
FIND Search for specified text strings in one or a group of files and display the lines containing them.
FOR Repeat a command for each item in a set.
FORMAT Make a disk usable or reusable.
GOTO Used in batch programs to make DOS go to the line with the specified label.
GRAPHICS Load the GRAPHICS memory-resident program (TSR) so that DOS can print graphics on the screen.
HELP Start the DOS command help program.
IF Implement conditional processing in batch programs.
INCLUDE Used in CONFIG.SYS to include the content of a system setting block here.
INSTALL Load TSR in CONFIG.SYS.
INTERLNK Complete the INTERLNK connection between client and server computers. Redirect the server.
INTERSVR Load the INTERLNK server software and redirect drive and printer ports. Copy the INTERLNK file from one computer to another.
KEYB Load KEYB TSR so that users can use non-standard keyboard layouts.
LABEL Display and change the disk volume label.
LASTDRIVE Specify the highest drive letter, which also specifies the maximum number of drives that the system can access.
LH Load the program into the specified area of the upper memory.
LOADFIX Load the running program in the space above the first 64KB.
LOADHIGH (See LH).
MD Create a new directory. Can be used interchangeably with MKDIR.
MEM Display the current memory usage.
MEMMAKER Move device drivers and TSR to upper memory to optimize memory usage.
MENUCOLOR Set the color of the startup menu.
MENUDEFAULT Specify the default menu item for the CONFIG.SYS startup menu and set the timeout value.
MENUIEM Define a menu item in the startup menu of CONFIG.SYS.
MKDIR (See MD).
MODE Configure the system device.
MORE Display the output of files or programs, and pause after each screen is displayed.
MOVE Move one or more files to other locations. Change the file or directory name.
MSAV Search for viruses in memory and on disks, and remove them when found.
MSBACKUP Backup and restore data on the computer.
MSCDEX Enable DOS to use CD-ROM drives.
MSD Display or report technical information about the computer.
NLSFUNC Start a program to load country-related information to support a certain language.
NUMLOCK Specify the initialization state of the number lock (Numlock) on the numeric keypad to be on or off.
PATH Define the search path for external executable files (including batch files).
PAUSE Temporarily suspend the execution in the batch program and prompt the user to press any key to continue.
POWER In laptops, reduce power consumption when applications and devices are idle.
PRINT Manage background printing.
PROMPT Change the command prompt.
QBASIC Start the QBASIC programming environment, allowing the writing, testing, and running of QBASIC programs.
RD Delete a directory.
REM Add comments in batch files or CONFIG.SYS.
REN Change one or more file names.
RENAME (See REN).
REPLACE Replace or add files from one directory to another.
RESTORE Restore files backed up by the BACKUP command of previous DOS versions (DOS 2.0 to 5.0).
RMDIR (See RD).
SCANDISK Detect and correct problems existing in the drive.
SET Set or change the value of an environment variable, or display the current value.
SETUP Install DOS from a floppy disk.
SETVER Set the version number that DOS reports to programs or device drivers. Display the version table.
SHARE Load SHARE TSR, which is used to install file sharing and locking functions for disk or network drives.
SHELL Specify the command interpreter for DOS.
SHIFT Shift the command line parameters passed to the batch file to the left.
SMARTDRV Start or set SmartDrive, which uses extended memory (extended memory) to generate disk buffers. Write buffered data.
SORT Sort the order of ASCII data and display the result.
STACKS Support the use of data stacks to handle hardware interrupts.
SUBMENU Define an item in the startup menu, and another set of options will appear when this item is selected.
SUBST Reassign a drive letter to represent a path.
SWITCHES Provide special options for several features of DOS.
SYS Copy DOS system files and the command interpreter to a formatted disk to make it a bootable disk.
TIME Display and allow modification of the system time.
TREE Display the directory structure in a graphical way.
TRUENAME Display the true location of a directory or file.
TYPE Display the content of a file.
UNDELETE Allow deletion protection or restore deleted files.
UNFORMAT Restore a disk that has been reformatted by the FORMAT command.
VER Display the DOS version number.
VERIFY Turn on or off write verification.
VOL Display the disk volume label and serial number.
VSAFE Load or remove VSAFE TSR, which is used to continuously monitor the computer to prevent operations that may be caused by viruses.
XCOPY Copy files and subdirectories.
DOS Device Drivers:
Command Function
ANSI.SYS Provide functions to control screen color, cursor position, and keyboard definition.
CHKSTATE.SYS Used by the MEMMAKER command to control the optimization process.
DBLSPACE.SYS Move DBLSPACE.BIN to an appropriate location in memory.
DISPLAVY.SYS Support the switching of screen and keyboard code pages.
DRIVER.SYS Generate a logical drive and assign it to a floppy drive.
DRVSPACE.SYS Move DRVSPACE.BIN to an appropriate location in memory.
EGA.SYS Used to save and restore the display when using the task switching program of the DOS Shell on an EGA monitor.
EMM386.EXE Provide access to the upper memory area, using extended memory (extended memory) to simulate expanded memory (expanded memory).
HIMEM.SYS Manage extended memory, including the high memory area (HMA).
INTERLNK.EXE Connect the client computer to the server computer and redirect drive and printer port names.
POWER.EXE In laptops, reduce power consumption when applications and devices are idle.
RAMDRIVE.SYS Use a part of the computer's random access memory (RAM) to simulate a hard disk drive.
SETVER.EXE Load the DOS version table into memory.
SMARTDRV.EXE Provide compatibility for hard disk controllers that cannot work on the memory provided by EMM386.EXE or Windows running in 386 enhanced mode.
