Saturday, June 23, 2007

DOS Command Reference

Even if the systems you support, upgrade, and repair are all running the latest version of Windows, you will inevitably find yourself occasionally troubleshooting these systems from the DOS command line. This is partial adaptation from Upgrading and Repairing PCs, 12th Edition by Que.
 
This blog post tends to provide you with all the basic essentials that a programmer need to know. Though this is an age of visual programming, I think the commands presented here may help you as they're doing to me. [Project : Basic Commands]
 
DOS Commands Found in DOS 6.22, Windows 95, and Windows 98
 

The Windows 98 Internal DOS Commands

Command

Description

BREAK

Sets or clears extended Ctrl+C checking.

CD

Changes to a different directory or, if run without parameters, displays the name of the

current directory.

CHCP

Displays the number of the active character set (code page). You can also use this

command to change the active character set for all devices that support character-set switching.

CHDIR

Takes the same action as the CD command.

CLS

Clears the screen.

COPY

Copies one or more files to the location you specify.

CTTY

Changes the terminal device used to control the computer.

DATE

Displays or sets the current date.

DEL

Deletes the files you specify.

DIR

Displays a list of the files and subfolders that exist in the current or specified folder.

ERASE

Deletes the files you specify.

EXIT

Quits COMMAND.COM and returns to the program that started the command inter-

preter, if one exists.

LH

Loads a program into upper memory.

LOADHIGH

Takes the same action as the LH command.

LOCK

Enables direct disk access.

MD

Creates a folder or subfolder.

MKDIR

Takes the same action as the MD command.

PATH

Specifies which folders Windows 98 should search for executable files.

PROMPT

Changes the appearance of the command prompt.

RD

Deletes a folder.

REN

Changes the name of the specified file or files.

RENAME

Takes the same action as the REN command.

RMDIR

Takes the same action as the RD command.

SET

Displays, sets, or removes environment variables.

TIME

Displays or sets the current time.

TYPE

Displays the contents of the specified text file.

UNLOCK

Disables direct disk access.

VER

Displays the operating system version number.

VERIFY

Directs the operating system to verify that files are written correctly to a disk and dis-

plays the status of verification.

VOL

Displays the volume label and serial number for a disk.

 

The Windows 98 External DOS Commands

Command

Description

ATTRIB.EXE

Displays or changes the attributes of the specified files.

CHKDSK.EXE

Checks a disk for (and optionally repairs) lost and cross-linked clusters. ScanDisk does a

better job at finding and repairing these errors.

CHOICE.COM

Used in batch files to present the user with a list of options.

COMMAND.COM

Starts a new instance of the command interpreter. This file is usually found in the root

directory of the boot drive.

CSCRIPT.EXE

(Windows 98 only) Runs Windows Script Host scripts.

CVT.EXE

(Windows 95 OSR 2 and Windows 98 only) Converts FAT drives to FAT32.

DEBUG.EXE

Tests and edits executable files.

DELTREE.EXE

Deletes a folder and all its files and subfolders.

DISKCOPY.COM

Makes an exact copy of a floppy disk.

DOSKEY.COM

A memory-resident program that recalls commands, edits previous command lines, and

runs macros.

EDIT.COM

Starts a text editor you can use to create and edit ASCII text files.

EXTRACT.EXE

(Windows 95/98 only) Extracts files from a compressed cabinet (CAB) file.

FC.EXE

Compares two files and displays the differences between them.

FDISK.EXE

Starts the FDISK utility.

FIND.EXE

Searches files for a specified text string.

FORMAT.COM

Formats a disk.

IEXTRACT.EXE

Extracts a file from an Internet Explorer backup information (DAT) file.

KEYB.COM

Configures a keyboard for a specific language.

LABEL.EXE

Creates or modifies the volume label of a disk.

MEM.EXE

Displays the amount of used and free memory on the computer.

MODE.COM

Configures a printer, serial port, or display adapter; sets the keyboard repeat rate; redi-

rects printer output from a parallel port to a serial port; prepares, selects, refreshes, or displays the numbers of the character sets (code pages) for parallel printers or the key-board and screen; and displays the status of all the devices installed on the computer.

MORE.COM

Pauses command output to display one screen at a time.

MOVE.EXE

Moves files and renames folders.

MSCDEX.EXE

Loads the real-mode CD-ROM driver.

NLSFUNC.EXE

Loads country-specific information for national language support.

SCANDISK.EXE

The real-mode version of ScanDisk.

SCANREG.EXE

(Windows 98 only) Scans the Registry for damage.

SORT.EXE

Reads input, sorts data, and writes the results to the screen, a file, or another device.

START.EXE

Enables you to set various parameters for running Windows programs from the DOS

prompt.

SUBST.EXE

Substitutes a drive letter for a path name.

SYS.COM

Creates a bootable disk by copying Windows 98's system files and

COMMAND.COM to the disk.

XCOPY.EXE

The extended copy command.

XCOPY32.EXE

(Windows 95 and Windows 98 only) The 32-bit version of XCOPY.

 

DOS 6.22 Commands Not Installed by Windows 95/98 but Available on the CD-ROM

Old DOS Commands Available on the Windows 98 CD-ROM

Command

Description

HELP.COM

Displays descriptions, syntax, and examples for all DOS commands. HELP.HLP is also

available.

MSD.EXE

Runs the Microsoft Diagnostics program used to gather system information for trou-

bleshooting. Superseded by the System Information utility in Windows 98.

QBASIC.EXE

The programming environment for creating QBASIC applications. QBASIC.HLP is also

 
 

Old DOS Commands Available on the Windows 95 CD-ROM

Command

Description

APPEND.EXE

Establishes a DOS search path for data files.

CHKSTATE.SYS

A device driver used by MemMaker to optimize memory use. You cannot use this driver.

EXPAND.EXE

Extracts a file from compressed format on the DOS distribution disks to a usable uncom-

pressed form.

GRAPHICS.COM

Enables the Print Screen key to print the contents of a graphics screen on a suitable

printer.

HELP.COM

Launches a full screen online help utility for the DOS commands.

INTERLNK.EXE

Client device driver for an InterLnk network.

INTERSVR.EXE

Server device driver for an InterLnk network.

LOADFIX.COM

Forces a program to load into the second 64KB of memory.

MEMMAKER.EXE

Utility for optimizing memory usage by device drivers and other programs loaded by

CONFIG.SYS and AUTOEXEC.BAT.

MSD.EXE

Runs the Microsoft Diagnostics program used to gather system information for trou-

bleshooting.

PRINT.EXE

Print spooler for ASCII text files.

QBASIC.EXE

Starts the Microsoft QuickBASIC development environment, a program for writing and

running BASIC language programs.

REPLACE.EXE

Replaces or adds files to a subdirectory.

RESTORE.EXE

Restores files created by the BACKUP program from one disk to another.

SIZER.EXE

A program used by MemMaker to optimize memory use. You cannot use this program.

TREE.EXE

Displays the subdirectory stricture of a disk.

UNDELETE.EXE

Undeletes a file or group of files.

 

DOS 6.22 Commands Not Available in Windows 95 or Windows 98

DOS 6.22

Command

Description

ASSIGN

In DOS 2–5, attached an alias drive letter to an existing drive. Replaced by SUBST in

DOS 6 and later.

BACKUP

A utility to back up files from a hard disk to a series of floppy disks. Replaced by MSBACKUP in DOS 6 and with the GUI version of Backup for Windows 95 and

Windows 98.

COMP

Compares two sets of disk files of the same name and same length. Included in DOS

1–5 but only on supplemental disk in DOS 6.

DOSSHELL

In DOS 4–6, a full screen menu driven shell for the DOS command line. Included only

on the supplemental disk for DOS 6.2.

EDLIN

In DOS 1–5, edits an ASCII file, replaced by EDIT. Only on supplemental disk in

DOS 6.

FASTHELP

Returns the same help information as including the /? switch with a DOS command.

FASTOPEN

A utility that sped up the process of opening files in DOS.

GRAFTABL

A DOS 3–5 utility for loading tables of additional character sets for CGA adapters.

Only on the supplemental disk in DOS 6.

JOIN

In DOS 3.1–5, connects one drive to a subdirectory of another. Only on the supplemen-

tal disk in DOS 6.

MIRROR

In DOS 5, records information about the FAT, the root directory, and optionally the parti-

tion table which can be used by UNFORMAT and UNDELETE. Only on the supplemental disk in DOS 6.

MSAV

Microsoft Anti-Virus for Windows 3.x.

MSBACKUP

Microsoft Backup for Windows 3.x.

POWER

Controls use of APM in laptop systems and other APM-enabled systems.

RECOVER

A file recovery utility with DOS 2–5 that was not distributed with DOS 6 or later. Not

recommended for use with any version.

SETVER

DOS version control program that reports a different DOS version number to programs

requiring a specific version of DOS to run.

SHARE

File sharing and locking capabilities for DOS.

SMARTMON

SMARTDrive monitoring and configuration program for Windows 3.x.

UNFORMAT

Recovers a disk that was accidentally formatted. Note that using the /U switch with the FORMAT command will prevent the UNFORMAT command from being able to recover the

disk.

VSAFE

A memory resident utility that warns you of virus-like activity.

 posted @ i-geek blog

0 responses:

Post a Comment

Thanking you for your comment(s). Hope you will visit this blog again!

Subscribe to geeklog feed Bookmark and Share

Design by Free blogger template