Summary Review of DOS Commands


Internal Command (part of command.com)

Items in brackets are optional parameters, items in bold are required

 

Note: Some of these commands are very dangerous. Please make sure you are sure of what they will accomplish before you invoke them as you may not be able to undo the results. I have tried to indicate these by changing the font to red.

 

CD [drive:]path

CHDIR [drive:]path

Changes from one directory to another

CD..

CHDIR..

Changes to the parent directory of the current subdirectory.

CD\

CHDIR\

Changes from the current directory to the root directory.

CLS

Clears screen

COPY directory1 directory2

Copies all the files in the first directory to another directory.

COPY filename directory-name

Copies a file to another directory(using the same name)

COPY filename drive

Copies a file to another drive (using the same name)

COPY filename1 filename2

Copies a file and creates a new file with a new name.

DATE

Displays, or set, system date

DEL [drive:][path]filespec [/p]

ERASE [drive:][path]filespec [/p]

Deletes a file, or group of files (if wildcards are used), with an option to prompt for verification (/p)

DIR [drive-name:]

Displays a list of filenames, sizes, dates, and times

EXIT

Closes the MS-DOS session and returns to Windows

MD [drive:]path

MKDIR [drive:]path

Creates a subdirectory

PATH

Displays the Windows path

PATH [drive:]path1;[drive:]path2.

Changes the Windows path to the paths of directories and subdirectories listed after the Path command

PROMPT $P$G

Displays the full path in the Windows prompt, followed by a greater-than symbol

PROMPT [text]

Customizes the appearance of the Windows prompt

RD [drive:]path

RMDIR [drive:]path

Removes an empty subdirectory from the directory structure of a disk

SET

Displays settings in the Windows environment

TIME

Displays, or sets, system time

TRUENAME

Displays the true name(full path and name) of a directory assigned a virtual drive named with the SUBST command

TRUENAME filename

Displays the true name (full path and name) of a file on a virtual drive

 

TYPE [drive:][path]filename

Displays the contents of a text file on the screen

VER

Displays the Windows version

VOL [drive:]

Displays the volume label for a drive

 

External Commands (Have own .exe or .com files)

 

ATTRIB [drive:][path][filename]

Displays the attributes

ATTRIB filespec+/- [attribute]

Assigns or removes an attribute

CHDSK [drive:][/f]

Examines the status of a disk, checks for errors, produces a report on disk and memory usage, and when used with /f, converts lost cluster to files

CHKDSK filespec

Displays information on whether files are fragmented or not fragmented

CVT drive:

Converts FAT16 file system to FAT32

DEBUG [drive:][path]filename

Tests and debugs DOS programs

DELTREE [drive:]path

Deletes a directory, all its sub-directories, & all files in the directories

DISKCOPY drive1: drive2:

Copies the contents of one floppy disk using the same drive or different drives and will overwrite all files on the destination diskette.

DOSKEY

Edits and recalls commands entered at the Windows prompt

 

EDIT [drive:][path][filename]

Starts the MS-DOS Editor so you can create, or open and edit, a text file

EXTRACT cabinet

Extracts the contents of a cabinet file

FC filename1 filename2

Compares two files and displays information on the differences in the contents of the files

FDISK

Displays partition information, creates or removes a partition on a disk, and creates logical drives.

FIND"string"filespec

Searches for a text string in a file or group of files

FORMAT drive [/s]

Formats a disk in a drive to the maximum capacity of that drive and , if the system switch (/s) is used, copies the operating system files to the disk

LABEL [drive]

Displays, creates, changes, or removes a disk’s volume label

MEM [/c][/p]

Displays a summary of memory usage and, if the classify switch (/c) and page switch (/p) are used, shows programs in conventional and upper memory one page at a time

MODE

Configures system devices, including serial and parallel ports, the video display, and keyboard; redirect output from a parallel port to a serial port

MORE

Produces paged output when used another command and preceded by the pipe operator ( | )

MOVE directory1 directory2

Changes the name of a directory; so does REN

MOVE [drive:][path]

filespec destination

Moves one or more files to another drive, directory, or drive and directory

NLSFUNC [drive:][path][filename]

Loads country specified information

SCANDISK [drive:]

Checks the filing system and surface integrity of a disk for errors of defects and , if possible, repairs the errors or, in the case of a surface scan, moves data from failing sectors. Windows has its own Scandisk version.

SCANREG

Checks the Windows 98 Registry for errors and repairs the errors

SORT

Sorts output when used with another command and preceded by the pipe operator ( | )

START program-filename

Opens a Windows application from a Windows prompt in an MS-DOS window

START [drive:][path] filename

Opens a Windows application and file from a Windows prompt in an MS-DOS window

SUBST drive: /d

Removes a virtual drive

SUBST drive: [drive:]path

Assigns a drive name to a directory to create a virtual drive

SYS drive1:drive2

Copies the Windows 98 operating system files from one drive to another

UNINSTAL

Uninstalls Windows 98 only if you installed it as an upgrade, specified that setup saved your system files, did not change to FAT32, and did not compress the drive

XCOPY source [destination][/s]

Copies all the files in a directory, or group of files, or a single file, to another disk and, when used with the subdirectory switch (/s), also copies the subdirectory structure to another disk

XCOPY32 source [destination][/s]

Similar to above, also copies long file names

 

BACK