| SAFE Commands | DANGEROUS Commands | SHORTCUT Keystrokes |
|
ANSI.SYSANSI.SYS is a device driver that needs to be loaded when your computer starts up. It controls the display of fonts and colors, controls cursor movement, reassigns the functions of keys, and allows you to use ANSI escape sequences as embedded meta-commands within batch files to add color, change video modes, place text precisely on the screen, etc. For more detailed help on ANSI.SYS, type HELP ANSI.SYS at any DOS command prompt. To activate ANSI.SYS you need to put a line in your CONFIG.SYS file, which resides in the DOS boot directory or root directory of your PC that tells your PC to load the driver whenever it is booted or turned on. (In Windows 95 you'll find CONFIG.SYS in the C:\WINDOWS\COMMAND directory) Use one of the two following lines to activate the driver:
DEVICE=ANSI.SYS
The first statement loads ANSI.SYS into conventional memory, the second loads ANSI.SYS into high memory. Load the driver into high memory to save space for programs or drivers that require conventional memory. NOTE: Unless you need the features provided by ANSI.SYS, don't load it. It will take up memory unnecessarily and could interfere with some other programs. If your PC is running Windows 95, for example, you don't need ANSI.SYS.
APPENDAPPEND allows a program to open data files in any directory on your PC as if the files were in the same directory as the one from which the program was started. NOTE: Don't use APPEND with Windows programs or from a DOS shell from Windows, it will crash your system. Appended directories are treated by the DOS system as if they were part of the current directory. For detailed help on the APPEND command type HELP APPEND at any DOS command prompt.
ASCIIASCII (American Standard Computer Information Interchange) code is used almost universally in PCs to display and control the placement of text on the screen and to provide a set of special characters for use in computer commands. Basically, a single ASCII code consists of 8 bits (8 on/off pulses - bits), 7 for data and 1 for parity. The 8 bit length allows for a total of 256 ASCII characters, including the standard alphabetic and numerical characters as well as a number of special signs, symbols and international characters. The table below provides a correspondence between ASCII designation and the character generated by the code.
ASCII Code Chart(Characters displayed will depend on the font loaded)
ATTRIBThe ATTRIB command can be used to display or alter file characteristics. Files can be:
For more detailed information on the ATTRIB command type HELP ATTRIB at any DOS command prompt.
Batch CommandsA batch file is a flat ASCII file - a text file - that contains a list of DOS commands. It must have the standard .BAT filename extension. A batch file can be executed by typing its name (with or without the .BAT filename extension) at the DOS command prompt. It is good policy to create a directory on your PC called C:\BAT which contains all the batch files you create yourself. The C:\BAT directory needs to be placed in the PATH= statement in your AUTOEXEC.BAT file so that DOS can find your batch files and execute them from a command entered at any location on your PC within the directory tree. When you enter the name of a batch file at the DOS command prompt, the commands contained within the batch file are executed in the order given and control is returned to DOS upon completion. You can use any DOS command in a batch file that you could also use at the DOS command prompt. In addition, there are some DOS commands that were designed especially with use in batch files in mind:
BREAKThe BREAK command sets or clears extended CTRL+C (break) checking. The command functions at the DOS command prompt or as a command line in the CONFIG.SYS file. Including the BREAK ON command in the CONFIG.SYS file extends checking every time the computer is booted or turned on. The CTRL+C keystroke combination is used to interrupt a program or an activity and is generally only read from the keyboard during input/output operations such as printing, screen display or interaction with the keyboard. Turning BREAK to the ON status allows DOS to extend CTRL+C interrupt checking to more kinds of activities. This is useful in that it gives the CTRC+C interrupt more power. The default is set to OFF. Only two forms of command syntax are acceptable:
BUFFERThe BUFFER command is used within the CONFIG.SYS file to allocate memory for a specified number of buffers when the computer is booted or starts.
CALLThe CALL command is used within a batch command file to start up another batch command file. CALL returns control to the original batch command file on successful completion of the called routines.
CHDIR (CD)The CHDIR, or CD command displays the name of the current directory or changes the current directory.
To display the current drive letter and directory name, use either CHDIR or CD without command parameters.
CHKDSKThe CHKDSK command is largely obsolete and has been replaced in its functionality by the SCANDISK.EXE program. CHKDSK checks the status of a physical disk and displays a status report. It is used to fix disk errors such as lost data strings and file allocation table errors. It also displays a brief summary of disk usage.
CHKSTATE.SYSA file used exclusively by MEMMAKER.EXE during memory optimization.
CHOICECHOICE is used only in batch command files to prompt the user to make a choice among several displayed options. CHOICE displays a prompt with options and pauses until the user chooses from among the set of displayed options. The batch command file branches to labeled subsections depending on the choice made.
CLSThe CLS command clears the screen and puts the cursor at the top.
COMMAND and COMMAND.COMThe COMMAND.COM program invokes the DOS command interpreter. For all intents and purposes, it is the DOS system. Issuing the COMMAND command (sic) at a system prompt or from within a batch command file starts a new instance of the command interpreter. For more information on the command interpreter, see your DOS manual.
CONFIG.SYSThe CONFIG.SYS file is an important system file that must reside in your DOS root directory. It contains parameters and commands that set up the environment in which your computer works. It also initializes any special devices that your system requires and determines the way in which your computer will utilize memory. The CONFIG.SYS file and its contents can be complex. For more information on the file, see your DOS manual. A template for a minimal CONFIG.SYS file is displayed below:
DEVICE=C:\DOS\ANSI.SYS
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE
DOS=HIGH,UMB
BUFFERS=20
FILES=40
BREAK ON
COPYThe COPY command copies one or more files to a location or file specified. The COPY command can also be used to concatenate files. When more than one file is copied, DOS displays the name of each file specified as it is copied.
See also the related command MOVE.
CTTYThis command can be used to change the input devices that control and drive your computer, normally the keyboard, and the mouse or joystick. If control is attached to another device, such as a serial port, the computer can be controlled remotely, perhaps via modem. See the DOS users manual for details of command syntax and program parameters.
DATEThe DATE command calls up a dialog that allows you to specify the date held in the computers nonvolatile memory. If the date your computer is assigning to files is incorrect this command allows you to correct the date parameter.
DBLSPACEThis is a driver system that was used to double the disk storage space in computers prior to DOS 6.22 by compressing stored data. It has been replaced by the DRVSPACE system.
DEBUGRuns the Debug program - a testing and editing tool. DEBUG [[drive:][path]filename [testfile-parameters]]
[drive:][path]filename Specifies the file you want to test.
testfile-parameters Specifies command-line information required by
the file you want to test.
After Debug starts, type ? to display a list of debugging commands.
DEFRAG.EXEThe DEFRAG program can be run interactively or in command mode from a batch file with command switches set. The program scans the directory structure and file allocation tables and optimizes the file structure of the disk specified. Your machine's performance will be enhanced by periodic use of the DEFRAG program to clean up and reorganize your hard disk. This program cannot be run from Windows.
DEL - ERASEThe DEL command deletes or erases a specified file or object from the disk. A full path to the file to be deleted can be included.
DELTREEThis command will remove a specified directory and all its subdirectories from the disk. WARNING: This command is difficult to reverse or recover from if used incorrectly or inadvertently. Use it with extreme caution.
DEVICE and DEVICEHIGHUsed only in the CONFIG.SYS file, this command loads a specified device driver into conventional memory when the computer is booted or started up. Device drivers power your PC's peripherals and set up the DOS environment. The corresponding DEVICEHIGH command loads the specified device driver into high memory. This allows other device drivers or programs more room in conventional memory.
DIRECTORY (DIR)The DIR command displays the files and subdirectories present in a specified directory on a specified drive.
DISKCOMPThis command permits the user to compare the contents of two floppy diskettes for differences track by track based on the format and organization of the first diskette in the comparison.
DISKCOPYThis command copies the entire content of a source floppy diskette to a target floppy diskette track by track based on the formatting of the source floppy and overwrites any information on the target floppy.
DISPLAY.SYSThis system driver allows the system to display international character sets on most color monitors. The driver must be loaded within the CONFIG.SYS file. See also the discussion on International Commands.
DOSThis command is used only in the CONFIG.SYS file. It governs where the operating system is loaded into memory and how it maintains its links to memory while running programs.
DOSKEY
This command can be input from the keyboard at a system prompt but is usually invoked
from the AUTOEXEC.BAT startup file. It loads a keystroke memory program
which allows the user to recall previously issued commands with the up arrow on the
keypad and edit them so that they can be repeated or modified and reentered with different
parameters. The program requires about 3K of conventional memory and remains resident. It
is of a type referred to as TSR (Terminate and Stay
Ready or Terminate and Stay Resident).
Reinstalls a new copy of the program in memory even if it's already been loaded.
Specifies the size of the buffer the program uses to store previous commands. The default is 512 bytes.
Displays all macros associated with DOSKEY.
Display a history of all commands stored in the buffer and can be redirected to a file for processing as a batch command file.
Starts the program so that commands can be edited in overstrike or insert mode. The default is overstrike. Insert is more useful.
Creates a command macro with name macroname and commands command_text.
DOSSHELLThe graphical interface refered to as the DOSSHELL is not bundled with DOS 6.22. It was a menu-driven interface to the operating system.
DRIVER.SYSThis disk driver system must be installed within the CONFIG.SYS file. It creates a logical drive on the hard disk that can be used in the place of a physical floppy disk drive. See the DOS users manual for details of command syntax, system and program parameters.
DRIVPARMThis command must be placed in the CONFIG.SYS file. It defines parameters for physical devices such as disk and tape drives when the operating system starts up. It modifies the characteristics of an existing disk drive and is used to override the driver definitions for any previously set up block device. See the DOS users manual for details of command syntax, system and program parameters.
DRVSPACE and DRVSPACE.SYSThis utility can be used to compress data storage on the hard disk or floppies using the DRVSPACE.SYS system driver with must be installed in the CONFIG.SYS file. Nowadays, most high-end PCs have enough disk space to make the use of this compression system thoroughly unnecessary. See the DOS users manual for details of command syntax, system and program parameters.
ECHOThis command is used primarily in batch command files as a means to enable or disable command echoing to the screen. The only command parameters are:
ECHO ON
Echoing can be turned on or off (enabled or disabled). A text message can be echoed to the screen from a batch command file. If this is coupled with ANSI codes, color, style and placement of text on the screen can be manipulated. The ECHO OFF command can, itself, be hidden from view from within a batch command file by using the following form:
EDITThis command invokes the DOS screen editor.
EGA.SYSThis system driver saves and restores the screen display when the DOS Shell Task Swapper is used with simple EGA monitors. If your computer system has an EGA monitor this driver must be installed within the command in the CONFIG.SYS file.
EMM386.SYSThe expanded memory system, EMM386.SYS, gives your computer access to the upper memory area, beyond the conventional 640K, that all microcomputers still use. It is generally used in combination with the HIMEM.SYS driver. EMM386.SYS allows the computer to use it's hard disk drive as extended memory to simulate expanded memory. It also allows you to load programs and other system drivers into upper memory blocks (UMB). EMM386.SYS is a device driver and must be loaded when the PC boots up or is started using the DEVICE command in the CONFIG.SYS file. Only microcomputers with an 80386 microprocessor, or better, can use EMM386.SYS. See your DOS users manual for command syntax and parameters.
ERASESee the DEL command.
EXITThis command quits the DOS command interpreter and returns control to the program from which DOS was called - Windows, for example.
EXPANDThis command expands a compressed program file. It can be used to retrieve and expand compressed program files from the DOS setup diskettes. See the DOS users manual for details of command syntax and program parameters.
FASTHELPThis command, used by itself, gives a condensed list of all available DOS commands. If used in conjunction with a command name it provides a shortened version of the help available on that subject. See also HELP.
FASTOPENThis command can be invoked in the AUTOEXEC.BAT or installed in the CONFIG.SYS file. It helps the system to open frequently used files more rapidly. For more information on the complex command parameters enter HELP FASTOPEN and any command prompt. FASTOPEN cannot be run from Windows.
FCThis command is used to compare the contents of two files for similarities and differences.
Most of the optional switches are unnecessary in common comparisons.
FCBSThis command is used only in the CONFIG.SYS file. It specifies the number of file control blocks (FCBS) that the operating system can have open at one time. A file control block is a data storage area that contains information about a file and its characteristics. See the DOS users manual for details of command syntax and parameters.
FDISKThis commmand starts the FDISK program. This program is used to configure the hard disk for use with DOS. It can be used to display and alter hard disk configuration, including add, delete and reconfigure hard disk partitions. WARNING: The FDISK program must be used with extreme caution since it exercises great control over the structure and functionality of the hard disk. You can request FDISK to display current hard disk parameters by using the FDISK /STATUS. This command is basically harmless, as it is only informational in character and does not really invoke the full FDISK capability. See the DOS users manual for details of command syntax and parameters.
FILESThis command is used only in the CONFIG.SYS file. It specifies the number of files that can be opened at one time. The maximum value is 255.
FINDThe FIND command searches for a specified text string in a file or group of files. When the search is complete the program displays any lines of text that contained strings that matched the specified search text.
FORThis command begins a batch command file loop. It will execute a set of batch file commands repeatedly until a condition set by a variable is met. See your DOS manual for syntax and command paremeters.
FORMATThe FORMAT command prepares a disk for use with the DOS system. Unformatted disks cannot be read or written to by the system. The command creates a root directory and establishes an empty file allocation table FAT for the directory structure. It checks the disk for bad sectors and marks them so that they cannot be used by the system. WARNING: The FORMAT command is destructive. It will destroy all data on a disk which has been formatted and used previously. This is very difficult to recover from or undo without the appropriate disk utilities. Use FORMAT with caution. The UNFORMAT command can be used to recover from an accidental diskette format, with some difficulty, but only if the /U optional switch has not been used and previous formatting information has been saved.
GOTOThis command is used exclusively in batch command files to allow the batch process to branch to a specified location, usually dependent on some sort of conditional test.
GRAPHICSThis command loads a memory-resident program that allows the system to dump screen displays to the printer. It can only be used if the system has a CGA color monitor or better. For a detailed description of the command and its use and parameters see your DOS system manual.
HELPThis command invokes the DOS help facility and files. It can be used alone - which calls up the full screen version of the facility with index - or it can be used in combination with the command for which help is need - which calls up only that command's information screens.
HIMEM.SYSThis system driver manages extended memory and is generally loaded as a companion to EMM386.SYS. It coordinates the use of extended memory, including the high memory area (HMA), so that no applications or device drivers attempt to use the same memory areas at the same time. Generally, HIMEM.SYS is loaded from within the CONFIG.SYS file using the DEVICE command. This allows the system to load the driver when it is booted or at start up. For more detailed information on HIMEM.SYS, see your DOS system manual.
IFThe IF command is used exclusively in batch command files. It begins a conditional test that may be used by the batch command file to branch based on the condition tested.
INCLUDEThe INCLUDE command is used exclusively in the CONFIG.SYS file for defining multiple boot configurations. Multiple boot configurations require that a menu be defined within the CONFIG.SYS file which appears when the computer boots or starts up. Every menu item displayed corresponds to a block of commands called a configuration block, in the CONFIG.SYS file. For more detailed information on the INCLUDE command, see your DOS user manual.
INSTALLThe INSTALL command is used exclusively in the CONFIG.SYS file to install system components and programs. For more detailed information on the INSTALL command, see your DOS user manual.
INTERLNK and INTERSRVRThis program connects two computers through their respective parallel or serial ports and enables them to share disk drives and printer ports. The INTERLNK.EXE device driver must be |