These are the basic Ms-Dos commands based on Wikipedia and other sources. Next to each command is a reference to the MS-DOS version (<X>).

 

 

CATEGORIES OF MS-DOS COMMANDS (click)

 

BASIC TERMINAL OPERATIONS

VER >2.0

An internal DOS command, that displays the DOS version number.

  • Syntax: VER

DATE & TIME >1.0

Displays the system date and prompts the user to enter a new date—the same with time.

  • Syntax: Date MM-DD-YY

HELP >5.0

Provides help with DOS commands.

  • Syntax: HELP [command]

FASTHELP >6.0

Provides information for MS-DOS commands.

  • Syntax: FASTHELP [command] [command] /?

EXIT >2.0

Exits the current command processor. If the exit is used at the primary command, it has no effect.

  • Syntax: EXIT

CLS or CLRSCR >2.0

The CLS or CLRSCR command clears the terminal screen.

  • Syntax: CLS

 

HARD DISK & FLOPPY DISKS {→ Return to menu}

FDISK >3.2

The FDISK command manipulates hard disk partition tables. The FDISK command can display information about, create, and delete DOS partitions. It can also install a standard master boot record on the hard drive.

  • Syntax: FDISK

FORMAT >1.0

Deletes the FAT entries and the root directory of the drive/partition, and reformats it for MS-DOS. This command can potentially erase everything on a computer's drive.

  • Syntax:
    • FORMAT volume [/FS:file-system] [/V:label] [/Q] [/L[:size]] [/A:size] [/C] [/X]
    • FORMAT /S (making the disk bootable)

SYS

Transfers system files to a disk.

  • Syntax: SYS [drive1:][path]

UNFORMAT >5.0

The UNFORMAT command can 'undo' the effects of a quick format, restoring the file table and making all the files accessible again. UNFORMAT only works if invoked before any further changes have overwritten the drive's contents.

  • Syntax: UNFORMAT [drive:][path]

CHKDSK >1.0

CHKDSK verifies a storage volume such as a floppy disk, hard disk, or disk partition. The command can fix errors and recover information from defective disk sectors.

  • Syntax: CHKDSK [volume:][[path]filename] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]

DEFRAG >6.0

The command can analyze the file fragmentation on a disk drive or to defragment a drive.

  • Syntax: DEFRAG [drive:]...

VOL >2.0

An internal command that displays the disk volume label and serial number.

  • Syntax: VOL [drive:]

TREE >3.2

It is an external command that graphically displays the path of each directory and sub-directories on the specified drive.

  • Syntax: TREE [drive:][path]

SCANDISK >6.2

Disk diagnostic utility. Scandisk replaced the chkdsk utility, starting with MS-DOS version 6.2 and later.

  • Syntax: SCANDISK [/SURFACE] [/AUTOFIX] [/CHECKONLY]

RECOVER

Recovers readable information from a bad or defective disk.

  • Syntax: RECOVER [drive:][path][filename]

 

COPYING & DELETING FILES {→ Return to menu}

COPY >1.0

Makes copies of existing files.

  • Syntax:
    • COPY example.txt [destination]
    • COPY example.txt b:
    • COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:][path][filename] [/V]
  •  

XCOPY >3.2

Copy entire directory trees. Xcopy is a version of the copy command that can move files and directories from one location to another.

  • Syntax:
    • XCOPY /? (usage and attributes)
    • XCOPY [destination] [/E] [/C] [/H] [/R] [/Y]

DISKCOPY >2.0

A command for copying the complete contents of a diskette to another diskette.

  • Syntax: DISKCOPY [drive1:][path1][filename1] [drive2:][path2][filename2]

DEL and ERASE >1.0

Delete one or more files.

  • Syntax: DEL [drive:][path]

UNDELETE >5.0

Restores file previously deleted with del. By default all recoverable files in the working directory are restored; options are used to change this behavior.

  • Syntax: UNDELETE [drive:][path][filename]

DELTREE >6.0

Deletes a directory along with all of the files and subdirectories that it contains.

  • Syntax: DELTREE [/Y] [d:]path [d:]path[...]

VERIFY >2.0

Enables or disables the feature to determine if files have been correctly written to disk (You can enable the verify command by typing "verify on" on Command Prompt and pressing enter. To display the current VERIFY setting, type VERIFY without a parameter. To turn off the feature, type "verify off").

  • Syntax:
    • VERIFY
    • VERIFY on|off

OTHER DISK OPERATIONS {→ Return to menu}

DIR >1.0

The DIR command displays the contents of a directory.

  • Syntax:
    • DIR [drive:][path]
    • DIR /P (pauses the screen)
    • DIR .com (Displays only the .com files in the directory)

CD and CHDIR >2.0

The CHDIR (or the alternative name CD) command either displays or changes the current working directory.

  • Syntax
    • CD example (in this case 'example' becomes the new directory)
    • You can also specify a directory to another drive: CD [drive:][path]
    • To back out one level out of the current directory: CD ..

MD or MKDIR >2.0

Makes a new directory. The parent of the directory specified will be created if it does not already exist.

  • Syntax: MKDIR [drive:][path]

RD or RMDIR >2.0

Remove a directory (delete a directory); by default the directories must be empty of files for the command to succeed.

  • Syntax: RMDIR [drive:][path]

MOVE >6.0

Moves files or renames directories.

  • Syntax: MOVE [/Y|/-Y] [d:][path]filename[,[d:][path]filename[...]] destination

REN >1.0

The REN command renames a file. Unlike the move command, this command cannot be used to rename sub-directories or rename files across drives. Mass renames can be accomplished by the use of asterisk (*) and question mark (?).

  • Syntax: REN [drive:][path][filename1] [filename2]

SETVER

Sets the MS-DOS version number for a program.

  • Syntax: SETVER [drive:][path]filename [/B:bytes]

TYPE & EDLIN

The command TYPE displays a text file. The command EDLIN edits text files.

  • Syntax:
    • TYPE [drive:][path][filename]
    • EDLIN [drive:][path][filename]

APPEND <3.2

Sets the path for data files or displays the current search path. The APPEND command is similar to the PATH command that tells DOS where to search for program files (files with a .COM, .EXE, or .BAT file name extension).

  • Syntax:
    • APPEND ;
    • APPEND [d:]path[;][d:]path[...]

ASSIGN >3 and <5

The command redirects requests for disk operations on one drive to another. It can also display drive assignments or reset all drive letters to their original assignments.

  • Syntax: ASSIGN [drive1:=[drive2:]]

ATTRIB >3.0

Attrib sets or clears file attributes {Read-Only, Archive, System, Hidden}. This means managing the file visibility and access by MS-DOS. The command can process whole folders and subfolders of files and also process all files.

  • Syntax: ATTRIB [+ R|-R] [+A|-A] [+ H|-H] [+ S|-S] [d:][path]filename [/S]

JOIN >3 and <5

The JOIN command attaches a drive letter to a specified directory on another drive. The opposite can be achieved via the SUBST command.

  • Syntax:
    • JOIN d: [d:path]
    • JOIN d: [/D]

LABEL >3.1

Changes the label on a logical drive, such as a hard disk partition or a floppy disk.

  • Syntax: LABEL [drive:][label]

 

MANAGING DEVICES  {→ Return to menu}

KEYB >3.2

The KEYB command is used to select a keyboard layout.

  • Syntax: KEYB [/CODEPAGE=page[,country]] [/E]

MSDEX

Provides CD-ROM access.

  • Syntax: MSCDEX [/D: driver /L:drive] [/M:bufsize] [/E /S /V]

MODE >3.2

Configures system devices. Changes graphics modes, adjusts keyboard settings, prepares code pages, and sets up port redirection.

  • Syntax: MODE [device] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]

MSD >6.0

The MSD command provides detailed technical information about the computer's hardware and software. MSD was new in MS-DOS 6.

  • Syntax:
    • MSD
    • To run MSD and create a report file called INFO.TXT, enter: MSD /p info.txt

 

MEMORY OPERATIONS  {→ Return to menu}

EMM386 >5.0

The EMM386 command enables or disables EMM386 expanded-memory support on a computer with an 80386 or higher processor.

  • Syntax: EMM386 [on|off|auto] [w=on|off]

MEM >4.0

Displays memory usage. It is capable of displaying program size and status, memory in use, and internal drivers. It is an external command. The command is available in MS-DOS versions 4 and later, on earlier DOS versions the memory usage could be shown by running CHKDSK.

  • Syntax: MEM[/program|/debug|/classify|/free|/module(name)] [/page]

MEMMAKER >6.0

MS-DOS included the external program MemMaker for freeing system memory (especially Conventional memory) by automatically reconfiguring the AUTOEXEC.BAT and CONFIG.SYS files. The whole process requires two system restarts. Before the first restart the user was asked whether to enable EMS Memory, since use of expanded memory required a reserved 64KiB region in upper memory. The first restart inserted the SIZER.EXE program which gauged the memory needed by each TSR or Driver. MemMaker would then calculate the optimal Driver and TSR placement in upper memory and modify the AUTOEXEC.BAT and CONFIG.SYS accordingly, and reboot the second time.

  • Syntax: MEMMAKER [/B][/batch][/session][/swap:d] [/T][/undo][/W:size1,size2]

SMARTDRV >4.01 <6.22

SmartDrive (or SMARTDRV) is a disk caching program.

  • Syntax: SMARTDRV [size] [/E /V] [/C] [/L:size]

 

BATCH FILES & AUTOEXEC.BAT {→ Return to menu}

COPY CON

Creates a batch file.

  • Syntax: COPY CON Autoexec.bat (in this case, we are going to create a bootable .bat file)

ECHO >6.0

Toggle echoing of commands on and off in batch files. This tells MS-DOS to read the lines but not echo them back to the screen. Traditionally batch files begin with the "echo off" statement.

  • Syntax: ECHO on|off

REM

Remark a comment within a batch file. Note that for MS-DOS 6 and above, in CONFIG.SYS.

  • Syntax: REM [comment]

GOTO

Directs the command interpreter to a labeled line in a batch program.

  • Syntax: GOTO <label>

IF

Allows for conditional operations in batch processing.

  • Syntax: IF [NOT] EXIST filename (command) [parameters]

CALL >3.3

Starts a batch file from within another batch file and returns when that one ends.

  • Syntax: CALL [d:][path]batchfilename [options]

PAUSE

Suspends execution of a batch file until a key is pressed.

  • Syntax: PAUSE [comment]

AUTOEXEC.BAT

This is a system file that was originally on DOS-type operating systems. It is a plain-text batch file in the root directory of the boot device. The name of the file is an abbreviation of "automatic execution", which describes its function in automatically executing commands on system startup; the filename was coined in response to the 8.3 filename limitations of the FAT file system family. In MS-DOS 6.0 and higher, a DOS boot menu is configurable.

  • EDIT c:\Autoexec.bat
  • Enter the commands
  • Press Alt-F then S to save the file
  • Press Alt-F then X to exit
  • Example
@ECHO OFF
PATH C:\DOS;C:\WINDOWS
SET TEMP=C:\TEMP
LH SMARTDRV.EXE
LH MOUSE.COM /Y

 

CONFIG.SYS (>2)  {→ Return to menu}

This is the primary configuration file for the DOS operating system. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS (typically residing in IBMBIO.COM or IO.SYS) during boot.

  • EDIT c:\Config.sys
  • Enter the commands
  • Press Alt-F then S to save the file
  • Press Alt-F then X to exit
  • Syntax:
    • DEVICE=(driver name) -Used in the CONFIG.SYS file to tell DOS which device driver to load
    • DEVICEHIGH=(driver name) -Install the device driver into the upper memory area
    • INSTALL (Internal) INSTALL=[d: ][\path]filename [parameters] -Load memory-resident programs into conventional memory
    • DRIVPARM= /D:(number) [/C] [/F:(form factor)] [/H:(number)] [/I][ /N][/S:(number)] [/T:(tracks)] -Set parameters for a disk drive
    • DOSSHELL [/B] [/G:[resolution][n]]|[/T:[resolution][n]] -Initiates the graphic shell program using the specified screen resolution
    • DOSKEY [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]] -Loads the Doskey program into memory which can be used to recall DOS commands
    • MENUITEM=blockname, [menutext] -Creates a start-up menu from which you can select a group of CONFIG.SYS commands to be processed upon reboot
    • MENUDEFAULT=blockname, [timeout] -Sets the startup configuration that will be used by DOS if no key is pressed within the specified timeout period
    • SUBMENU=blockname, [menutext] -Creates a multilevel menu from which you can select start-up options
    • NUMLOCK=on|off

{→ Return to menu}

SOURCES


Ms-Dos Commands

BinaryValue.com (c)

 

> FIND MORE

□ MODELS
» IBM PCs » IBM AT 5170  
» Atari PCs » FM Towns  
□ MS-DOS » MS-DOS Commands (1.0-6.22)