Ms DOS Commands

Complete DOS Commands List

This document contains all 116 DOS commands, syntax, and description in a table format.

S.N

Command

Syntax

Description

1

APPEND

APPEND [d:]path[;][d:]path[...] /X:on|off /path:on|off /E

Displays or sets the search path for data files.

2

ASSIGN

ASSIGN x=y [...] /sta

Redirects disk drive requests to a different drive.

3

ATTRIB

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

Sets or displays file attributes.

4

BACKUP

BACKUP d:[path][filename] d: [/S] [/M] [/A] [/F:(size)] [/P] [/D:date] [/T:time] [/L:[path]filename]

Makes a backup copy of files.

5

BREAK

BREAK =ON|OFF

Sets whether DOS checks for Ctrl+Break.

6

BUFFERS

BUFFERS=(number),(read-ahead)

Sets number of disk buffers and read-ahead sectors.

7

CALL

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

Calls another batch file and returns.

8

CHCP

CHCP (codepage)

Displays or changes DOS code page.

9

CHDIR (CD)

CHDIR [d:]path /CHDIR ..

Displays or changes the current directory.

10

CHKDSK

CHKDSK [d:][path][filename] [/F][/V]

Checks a disk and provides status report.

11

CHOICE

CHOICE [/C[:]keys] [/N][/S][/T[:]c,nn] [text]

Provides user choice prompt in batch files.

12

CLS

CLS

Clears the screen.

13

COMMAND

COMMAND [d:][path] [device] [/P][/E:(size)] [/MSG][/Y [/C (command)|/K (command)]

Starts DOS command processor.

14

COMP

COMP [d:][path][filename] [d:][path][filename] [/A][/C][/D][/L][/N:(number)]

Compares two groups of files.

15

COPY

COPY [/Y|-Y] [/A][/B] [d:][path]filename [...] [/V]

Copies or appends files.

16

COUNTRY

COUNTRY=country code,[code page][,][d:][filename]

Sets country-specific conventions in DOS.

17

CTTY

CTTY (device)

Changes standard input/output device.

18

DATE

DATE mm-dd-yy

Displays or sets the system date.

19

DBLSPACE

DBLSPACE options

Compresses and manages disks.

20

DEBUG

DEBUG [pathname] [parameters]

Tests and edits programs.

21

DEFRAG

DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh][/LCD|/BW|/GO] [/H]

Optimizes disk by reorganizing files.

22

DEL (ERASE)

DEL [d:][path]filename [/P]

Deletes files.

23

DELOLDOS

DELOLDOS [/B]

Deletes files from previous DOS versions.

24

DELTREE

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

Deletes directories and subdirectories.

25

DEVICE

DEVICE=(driver name)

Loads device driver in CONFIG.SYS.

26

DEVICEHIGH

DEVICEHIGH=(driver name)

Loads device driver into upper memory.

27

DIR

DIR [d:][path][filename] [/A:(attributes)] [/O:(order)] [/B][/C][/CH][/L][/S][/P][/W]

Displays directory listing.

28

DISKCOMP

DISKCOMP [d:] [d:][/1][/8]

Compares two diskettes.

29

DISKCOPY

DISKCOPY [d:] [d:][/1][/V][/M]

Copies an entire diskette.

30

DOS

DOS=[high|low],[umb|noumb]

Specifies memory location for DOS.

31

DOSKEY

DOSKEY [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]]

Enables command recall and editing.

32

DOSSHELL

DOSSHELL [/B] [/G:[resolution][n]]|[/T:[resolution][n]]

Starts DOS graphical shell.

33

DRIVPARM

DRIVPARM= /D:(number) [/C] [/F:(form factor)] ...

Sets disk drive parameters.

34

ECHO

ECHO on|off / ECHO (message)

Displays messages or enables/disables command display.

35

EDIT

EDIT [d:][path]filename [/B][/G][/H][/NOHI]

Starts MS-DOS editor.

36

EMM386

EMM386 [on|off|auto] [w=on|off]

Enables/disables expanded-memory support.

37

EXE2BIN

EXE2BIN [d:][path]filename [d:][path]filename

Converts .EXE files to binary.

38

EXIT

EXIT

Exits secondary command processor.

39

EXPAND

EXPAND [d:][path]filename [...]

Expands compressed files.

40

FASTHELP

FASTHELP [command][command] /?

Displays DOS commands with brief explanations.

41

FASTOPEN

FASTOPEN d:[=n][/X]

Tracks files for faster access.

42

FC

FC [/A][/C][/L][/Lb n][/N][/T][/W] [file1] [file2]

Displays differences between files.

43

FCBS

FCBS=(number)

Specifies number of file-control blocks in CONFIG.SYS.

44

FDISK

FDISK [/status]

Prepares fixed disk for DOS files.

45

FILES

FILES=(number)

Maximum number of open files.

46

FIND

FIND [/V][/C][/I][/N] "string" [d:][path]filename [...]

Searches for a string in files.

47

FOR

FOR %%(variable) IN (set) DO (command)

Performs repeated execution in batch or interactive.

48

FORMAT

FORMAT d: [/options]

Formats a disk.

49

GOTO

GOTO (label)

Branches to a label in batch file.

50

GRAFTABL

GRAFTABL [(code page)]

Loads graphics character table.

51

GRAPHICS

GRAPHICS [printer type][profile] [/options]

Prints contents of graphics screen.

52

HELP

HELP [command] [/options]

Displays information about DOS commands.

53

IF

IF [NOT] EXIST filename (command) ...

Conditional operations in batch files.

54

INCLUDE

INCLUDE=blockname

Use commands from one CONFIG.SYS block in another.

55

INSTALL

INSTALL=[d: ][\path]filename [parameters]

Loads memory-resident programs.

56

INTERLINK

INTERLINK [client[:]=[server][:]]

Connects two computers for sharing drives/printers.

57

INTERSVR

INTERSVR [options]

Starts Interlink server.

58

JOIN

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

Access directory on a different drive.

59

KEYB

KEYB [xx][,][yyy][,][d:][path]filename [/E][/ID:(number)]

Loads keyboard support program.

60

LABEL

LABEL [d:][volume label]

Creates/changes/deletes volume label.

61

LASTDRIVE

LASTDRIVE=(drive letter)

Sets maximum number of accessible drives.

62

LOADFIX

LOADFIX [d:][path]filename [parameters]

Loads program above 64K memory.

63

LOADHIGH (LH)

LOADHIGH [d:][path]filename [parameters]

Loads program into upper memory.

64

MEM

MEM [/options]

Displays installed and available memory.

65

MEMMAKER

MEMMAKER [/options]

Optimizes computer memory.

66

MENUCOLOR

MENUCOLOR=textcolor,[background]

Sets DOS menu text colors.

67

MENUDEFAULT

MENUDEFAULT=blockname, [timeout]

Sets default menu selection if no key pressed.

68

MENUITEM

MENUITEM=blockname, [menutext]

Creates startup menu item.

69

MIRROR

MIRROR [options]

Saves disk info for recovery.

70

MKDIR (MD)

MKDIR [d:]path

Creates a new subdirectory.

71

MODE

MODE [device] [options]

Sets device or communication modes.

72

MORE

MORE < (filename or command)

Displays output one screen at a time.

73

MOVE

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

Moves or renames files/directories.

74

MSAV

MSAV [d:] [/options]

Scans for viruses.

75

MSBACKUP

MSBACKUP [setupfile] [/options]

Backup or restores files.

76

MSCDEX

MSCDEX /D:driver [/options]

Access CD-ROM drives.

77

MSD

MSD [/options]

Displays detailed system information.

78

NLSFUNC

NLSFUNC [d:][path]filename

Loads country-specific info.

79

NUMLOCK

NUMLOCK=on|off

Sets NumLock state.

80

PATH

PATH [d:]path[;...]

Sets or displays program search path.

81

PAUSE

PAUSE [comment]

Pauses batch file until key press.

82

POWER

POWER [adv:max|reg|min|std|off]

Controls power management.

83

PRINT

PRINT [options] [d:][path][filename]

Queues files for printing.

84

PROMPT

PROMPT [prompt text] [options]

Changes DOS command prompt.

85

RECOVER

RECOVER [d:][path]filename

Recovers files with bad sectors.

86

REM

REM [comment]

Inserts remarks in batch/CONFIG.SYS.

87

RENAME (REN)

RENAME [d:][path]filename [d:][path]filename

Changes file name.

88

REPLACE

REPLACE [d:][path]filename [d:][path] [/options]

Replaces existing files.

89

RESTORE

RESTORE d: [d:][path]filename [/options]

Restores files from backup.

90

RMDIR (RD)

RMDIR [d:]path

Removes a subdirectory.

91

SCANDISK

SCANDISK [options]

Checks and repairs disk.

92

SELECT

SELECT [d:] [d:][path] [country code][keyboard code]

Formats disk and installs country-specific info.

93

SET

SET (string1)=(string2)

Creates environment variables.

94

SETVER

SETVER [d:]:path][filename (number)][/delete][/quiet]

Sets DOS version reported to programs.

95

SHARE

SHARE [/F:space] [/L:locks]

Enables file sharing/locking.

96

SHELL

SHELL=[d:][path]filename [parameters]

Specifies DOS command interpreter.

97

SHIFT

SHIFT

Shifts batch file parameters.

98

SORT

SORT [/R][/+n] < (filename)

Sorts input and outputs to screen/file.

99

STACKS

STACKS=(number),(size)

Sets number and size of stack frames.

100

SUBMENU

SUBMENU=blockname, [menutext]

Creates multilevel startup menu.

101

SUBST

SUBST d: d:path /D

Substitutes virtual drive letter for path.

102

SWITCHES

SWITCHES= [/K][/F][/N][/W]

Configures DOS special options.

103

SYS

SYS [source] d:

Copies DOS system files to disk.

104

TIME

TIME hh:mm[:ss][.cc][A|P]

Displays/sets system time.

105

TREE

TREE [d:][path] [/A][/F]

Displays directory paths and files.

106

TYPE

TYPE [d:][path]filename

Displays file contents.

107

UNDELETE

UNDELETE [d:][path][filename] [/options]

Restores deleted files.

108

UNFORMAT

UNFORMAT d: [/options]

Undoes disk format.

109

VER

VER

Displays DOS version number.

110

VERIFY

VERIFY on|off

Turns on/off verification of file copy.

111

VOL

VOL [d:]

Displays volume label of disk.

112

VSAFE

VSAFE [/options]

Monitors for viruses.

113

XCOPY

XCOPY [d:][path]filename [d:][path][filename] [/options]

Copies files/directories.


No comments:

Post a Comment