home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util4
/
doshelp.lzh
/
DOSHELP.DAT
next >
Wrap
Text File
|
1990-03-30
|
90KB
|
1,809 lines
═══════════════════ DOS HELP - Version 2.1 ═══════════════════
(c) Copyright 1990 by Richard Guenette
DOSHELP is a guide to MS-DOS that will help you use your PC. All
command examples show a prompt for drive C. Your prompt may vary
with the drives and Prompt command used. DOSHELP is based on DOS
3.2 but will answer most questions about all DOS versions. Check
the DOS VERSIONS topic heading if you have another version of DOS
and can't find a command topic.
You may use, copy, and distribute DOSHELP free of charge. You may
not alter the program without permission. No one may sell DOSHELP,
or include it as part of a system for sale. Computer user groups,
shareware software houses, BBS sysops, and information utilities
may charge a cost-based fee of no more than $8 to distribute it.
DOSHELP is not meant to replace a complete MS-DOS reference work.
While this program was prepared with care, it is provided on an
as-is basis without guarantees of any kind. The author assumes
no risk for any consequences arising from its use.
ANSI.SYS is a device driver that comes with DOS. ANSI.SYS can be used to:
■ Control cursor position ■ Set screen colors
■ Control character attributes ■ Reassign Keys
Before it can be used, ANSI.SYS must appear in a line of your CONFIG.SYS file
that looks something like: DEVICE=C:\BIN\ANSI.SYS. In this case the computer
is being told to look for ANSI.SYS in the BIN directory of drive C. Locate
ANSI.SYS on your drive and tell the computer where to find it.
ANSI.SYS works by using ESCAPE SEQUENCES. Such sequences begin with the ESC
(ASCII 27) character. The ESC character looks like a left facing arrow ().
See the ESC CODES topic heading to learn how to type ESCAPE. Most ASCII text
editors can be used to write escape sequences. Save your escape sequences as
a batch (BAT) file using the technique shown below. Enter the name of the
file at the DOS prompt to accomplish the desired result.
ECHO ESCAPE SEQUENCE > CON
If the line above had been saved as DOG.BAT, entering "DOG" at the DOS prompt
would echo, or send, the escape sequence to the computer console (CON).
APPEND sets the system search path for data files. The function of APPEND
is complementary to the PATH command, which searches for executable files.
Put a semicolon in the search path of an APPEND command to tell the system
to return to the root directory and begin a new search path. In this way
an APPEND command can be set to search more than one directory at a time.
Some examples:
C: APPEND (Display current search path for data files.)
C: APPEND ; (Set the data file search path to no path.)
C: APPEND C:\TANK\SPEAR;\JUNE (Search for data files on drive C. Search
the TANK directory off the root and the
SPEAR subdirectory of TANK. Return to the
root and search the JUNE directory.)
ASSIGN is used to assign a drive designation to a different disk drive. ASSIGN
is typically used on systems that have acquired a new disk drive with old batch
files that are "hard wired" to deal with an old drive letter. ASSIGN should
not be used with the BACKUP or PRINT command. It's not a good idea to make a
habit of using the ASSIGN command since it hides the true device type from
commands that ask for that information. Some examples:
C: ASSIGN B = A (Assign the B drive designation to drive A so that
when drive B is asked for, drive A will be called.)
C: ASSIGN A = C (Assign the A drive designation to drive C so that
when drive A is asked for, drive C will be called.)
C: ASSIGN (Cancel the effect of previous ASSIGN commands.)
The ATTRIB command is used to display, set, or reset the READ-ONLY and ARCHIVE
attribute of a file. Each file has these attributes recorded as part of its
directory entry in DOS. The options for the ATTRIB command are:
+R = Set the read-only attribute
-R = Clear the read-only attribute
+A = Set the archive attribute
-A = Clear the archive attribute
The archive attribute is automatically set whenever the file is written to or
altered. This can prove useful. The BACKUP command, for example, can be
made to work only with files whose archive attribute has been set. Examples:
C: ATTRIB *.* (Show file attributes in the current directory.)
C: ATTRIB -A C:\BIN\*.EXE (Remove the archive attribute from all EXE
type files in the BIN directory of drive C.)
C: ATTRIB +R TEST.C (Add the read-only attribute to the TEST.C file.)
AUTOEXEC.BAT is a special file that you can use to help customize the way your
PC works. The system automatically looks for AUTOEXEC.BAT when it starts up
and will execute any commands it contains. To make certain that AUTOEXEC.BAT
can be found you should place it in the ROOT directory of your boot disk.
AUTOEXEC.BAT is a BATCH file and is governed by the same rules as other batch
files. Here is a sample AUTOEXEC.BAT with explanations in parentheses:
│ PROMPT $P$G (Set DOS prompt to show PATH and ">" character)
│ PATH = C:\WP;\BIN (Set system search path to C:\WP and C:\BIN)
│ MOUSE (Install a mouse by running the mouse program)
│ MENU (Run the MENU program)
The last line of the AUTOEXEC.BAT file contains the last command the PC will
execute as part of its start up routine. In this case a MENU program is run
so that the user can select a desired activity from a menu.
NOTE: Software installation routines sometimes overwrite AUTOEXEC.BAT.
════ It's a good idea to keep a copy of the file under another name.
BACKUP is used to back files up from one disk to another. The first drive
specified is the source drive, the 2nd is the destination. You should create a
supply of blank formatted diskettes before using BACKUP. The RESTORE command
is used to restore files backed up with BACKUP. BACKUP uses these parameters:
/S - Backup any subdirectories found.
/M - Backup only files modified since the last backup.
/D: - Backup only those files after a certain DATE.
/T: - Backup only those files after a certain TIME.
/L: - Make a backup LOG file under a specified filename.
C: BACKUP A: C: (Backup drive A into the BACKUP dir of drive C.)
C: BACKUP C:\ A: /S (Backup all of C, with subdirectories, onto drive A.)
C: BACKUP C:\ A: /D:4-02-88 (Backup files dated since 4/2/88 from the
root directory of drive C onto drive A.)
C: BACKUP C:\*.TXT A: /L:MAY.LOG (Backup all TXT type files in the root dir of
C onto drive A. In the process create a
backup log file called MAY.LOG on drive C.)
BATCH files are executable files that contain DOS commands. These commands
are assembled in order to automate tedious processes. Batch files can include
the use of replaceable parameters, conditional statements, branching and
labels. No attempt is made here to teach you how to write batch files. The
best way to learn how to use batch files is to study BAT files written by
other people. Some BATCH file rules:
■ Batch files always end with a "BAT" extension.
■ Batch files are composed of ASCII text and written in text editors.
■ To run a batch file, just type the filename at the DOS prompt.
■ BAT, COM, and EXE files are all executable files. DOS runs COM or EXE
files of the same name before a BAT file. Be careful to give your BAT
files unique names so this doesn't happen.
■ Press CONTROL+C to stop a batch file while it is executing.
■ A batch file can run another batch file, but the new file won't return
to the original file. In most cases COMMAND can be used with the /C
parameter to circumvent this problem. (See COMMAND)
■ The following DOS commands can only be used in batch files: IF, GOTO,
PAUSE, REM, and SHIFT.
■ Batch files can be written to work with parameter information entered
after the batch file name on the DOS command line.
The BREAK command specifies when DOS will check to see if CONTROL+C has been
pressed. The CONTROL+C combination is used to stop, or break, a program. The
possible variants of the BREAK command are shown below.
C: BREAK (Display the current BREAK checking status.)
C: BREAK ON (Check to see if CONTROL+C has been pressed
whenever program requests a DOS function.)
C: BREAK OFF (DOS should check to see if CONTROL+C has been
pressed only during keyboard, screen, or
asynchronous communications operation.)
BUFFERS is a command line that appears in the CONFIG.SYS file. The buffer line
determines how much memory is set aside to hold data that is read and written
from disk storage. You might think of this as the size of a spoon being used
to eat a bowl of soup. If the spoon is too small, you'll have to use the spoon
a great deal and will only be able to eat the soup SLOWLY!
The BUFFERS line in CONFIG.SYS will look like:
BUFFERS = nn
Where "nn" is some number between 1 and 99. If there is no BUFFERS line, the
default value is 2. Each "1" added to this number takes away roughly 500 bytes
of memory from other system uses.
Setting BUFFERS correctly can IMPROVE PERFORMANCE DRAMATICALLY! A slow and
chattering disk drive is the chief symptom indicating that the number of
BUFFERS should be enlarged. Assigning too many buffers wastes memory and slows
performance as well. A good range to set buffers for most hard disk systems is
12 to 24.
The DOS command to change directories is spelled either CD or CHDIR. This
command is used to change the location of the current directory in the drive
specified. If no drive is specified the current drive is assumed. If CD or
CHDIR is used without any trailing information it will show the directory the
system is currently located in. Some examples:
C: CHDIR (Show me the directory I'm in on the C drive.)
C: CD \ (Move to the root directory)
C: CD.. (Move to the parent directory of the current directory.)
C: CD STAMPS (Move to the STAMPS subdirectory of current directory.)
C: CD \STAMPS (Move to the STAMPS subdirectory of the root directory.)
C: CD A:\BOOT (Change the current directory on drive A to the BOOT
subdirectory, but remain in drive C.)
PC characters from 1 to 31 are symbols in some environments, but in DOS
these characters are CONTROL KEY codes, not symbols. The CARET (^) symbol
stands for the CONTROL key. Thus "^C" means CONTROL+C. Symbols from 32
to 126 are standard typewriters characters used on all QWERTY keyboards.
─────────────────────────────────────────────────────────────────────────────
0·(nul) 16·^P 32·space 48·0 64·@ 80·P 96·` 112·p
1·^A 17·^Q 33·! 49·1 65·A 81·Q 97·a 113·q
2·^B 18·^R 34·" 50·2 66·B 82·R 98·b 114·r
3·^C 19·^S 35·# 51·3 67·C 83·S 99·c 115·s
4·^D 20·^T 36·$ 52·4 68·D 84·T 100·d 116·t
5·^E 21·^U 37·% 53·5 69·E 85·U 101·e 117·u
6·^F 22·^V 38·& 54·6 70·F 86·V 102·f 118·v
7·^G 23·^W 39·' 55·7 71·G 87·W 103·g 119·w
8·^H 24·^X 40·( 56·8 72·H 88·X 104·h 120·x
9·^I 25·^Y 41·) 57·9 73·I 89·Y 105·i 121·y
10·^J 26·^Z 42·* 58·: 74·J 90·Z 106·j 122·z
11·^K 27·ESC 43·+ 59·; 75·K 91·[ 107·k 123·{
12·^L 28·^\ 44·, 60·< 76·L 92·\ 108·l 124·|
13·^M 29·^] 45·- 61·= 77·M 93·] 109·m 125·}
14·^N 30·^^ 46·. 62·> 78·N 94·^ 110·n 126·~
15·^O 31·^_ 47·/ 63·? 79·O 95·_ 111·o 127·
CHKDSK is the DOS command used to check a disk. CHKDSK analyses disk contents,
checking for inconsistencies between the FAT (File Allocation Table) and
directories. CHKDSK tells you how many files and directories are on a disk
and how much space they take up. CHKDSK also reports the amount of memory
available to the system. CHKDSK uses the following parameters:
/F - Correct inconsistencies between the FAT and directories.
/V - Display all file and directory names as they are being processed.
Here are some examples of the CHKDSK command:
C: CHKDSK A: (Run the Check Disk program on drive A.)
C: CHKDSK /F /V (Run Check Disk on drive C, displaying all files
and directories in the process. Correct any
differences between the FAT and directories.)
C: CHKDSK *.COM (Run Check Disk on drive C. Display fragmentation
information on all COM type files.)
The CLS command is used to home the cursor and clear the screen in DOS.
C: CLS (Clear the screen and send the cursor to the upper left hand
corner of the screen. If ECHO ON is in effect, show the DOS
prompt. If ECHO OFF is in effect, show only the cursor.)
COMMAND.COM is the portion of DOS that contains all the internal commands.
Internal commands (such as DIR) are those that do not have separate program
files. When COMMAND is issued, a "child" version of COMMAND.COM is run under
the original "parent" version. This consumes about 3K of RAM. The EXIT
command is used to return to the "parent" version. COMMAND parameters are:
/P - Make the new version of COMMAND.COM permanent in memory.
/C string - Execute the command specified by the string and return
to the original version of COMMAND.COM.
/E:nn - Set the size of the DOS environment to "nn" number of bytes.
Some Examples ...
C: COMMAND /P (Run a child version of COMMAND.COM that is
permanent in memory.)
C: COMMAND /E:2048 (Reserve 2048 bytes for the DOS environment space.)
C: COMMAND /C GO.BAT (Run a new version of COMMAND.COM, run GO.BAT and
then return to the original version of COMMAND.COM.
This command returns to a batch file that uses it.)
CONFIG.SYS is a file used to help configure your PC. CONFIG.SYS consists of a
series of statements that control many aspects of the way the PC works. When
the PC is started, the system looks for CONFIG.SYS in the root directory of the
boot drive. CONFIG.SYS can be created or edited in an ASCII text editor.
Changes made in CONFIG.SYS take effect when the PC is rebooted.
Commands like BUFFERS and FILES are of general interest while others like
FCBS and DRIVEPARM should only be used by technically expert users.
────────────── The Following Commands Appear in CONFIG.SYS: ───────────
BREAK = ON (or) OFF
BUFFERS = nn (where "nn" is a number from 1 to 99)
COUNTRY = nnn (where "nnn" is a three digit country code)
DEVICE = DRIVE:\PATH\FILENAME (tell the system where to find the file)
DRIVEPARM = (various block device parameters)
FCBS = m,n (where "m" & "n" are numbers relating to file control blocks)
FILES = nn (where "nn" is a number from 8 to 255. Default is 8)
LASTDRIVE = D (where "D" is the highest drive letter allowed)
SHELL = DRIVE:\PATH\FILENAME (tell the system where to find the file)
COPY may be the most widely used command in DOS. COPY copies one or more files
from one disk location to another. COPY can create files, concatenate several
small files into a large one, or transfer data between any of the DOS devices
like the screen and the printer. COPY uses the following parameters:
/A - Treat files as ASCII text files. Data is copied up to the first
CONTROL+Z character encountered. A CONTROL+Z end-of-file marker
will be appended to a destination file created by COPY.
/B - Treat files as BINARY files. Copy the entire file based on
its directory size. Ignore CONTROL+Z as an end-of-file marker.
/V - Causes DOS to VERIFY if the file was copied properly. This has the
same effect as using the VERIFY ON command.
COPY can be used to concatenate up to four files into a destination file that
includes them all. The format for this is shown here:
COPY FILE1+FILE2+FILE3+FILE4 NEWFILE
A plus sign (+) appears between each of the files being joined. The new file
created appears at the end of the command.
The COUNTRY command lets you set the date & time format, currency symbol, and
decimal separator used in DOS so that they match the usage in a particular
country. This command appears in the CONFIG.SYS file as follows:
COUNTRY = nnn
Where "nnn" is a three digit country code. If no COUNTRY command is used the
system is set to the USA by default. Below is a table of COUNTRY CODES.
Australia -- 061 Germany ----- 049 Portugal ------- 351
Belgium ---- 032 Israel ------ 972 Spain ---------- 034
Canada ----- 002 Italy ------- 039 Sweden --------- 046
Denmark ---- 045 Netherlands - 031 Switzerland ---- 041
Finland ---- 358 Norway ------ 047 United Kingdom - 044
France ----- 033 United States -- 001
The CTTY command changes the standard input (keyboard) and output (screen) used
by the system to an auxiliary console. It is also used to restore the standard
input and output devices. Some examples:
C: CTTY AUX (Transfer the system's standard input (keyboard) and output
(screen) to the auxiliary, or AUX device. AUX is typically a
remote PC accessed through a serial port and telephone line.)
C: CTTY CON (Transfer the system's standard input and output back to the
original console (CON) from some auxiliary device. NOTE: This
command must be issued from the AUX device.)
The DATE command sets the date that is stamped on files when they are copied
or altered. It is important to note that the DATE command doesn't necessarily
permanently alter the real time system clock. On AT type systems, unless DOS
3.3 is being used, the SETUP.COM program must be run to change the backup
memory that keeps track of the system clock. Using a DATE command in such
systems will lose its effect the first time the system is shut off. On PC/XT
type systems the situation varies, depending on the way the clock has been
implemented. In some cases time/date clocks have been added as a 3rd party
add-on. You may have to consult the documentation that came with such a clock
if you have one. You can test how your system uses DATE and TIME commands by
executing a TIME command and then seeing if it is still in effect after the
computer has been shut off.
The format of the DATE command is determined by the COUNTRY statement in effect
in CONFIG.SYS. An example:
C: DATE 02-05-88 (Change system date to the 5th of February, 1988
using USA format.)
DEL is the command used to delete files. ERASE can also be used for this
purpose and is functionally identical to DEL. Simply type DEL followed by
the filename(s) to be deleted. Wildcard characters can be used with DEL. The
command "DEL *.*" represents a request to delete all files in the current
directory. In such cases DOS asks the following question as a safety
precaution:
Are you sure? (Y/N)?
Typing a "Y" proceeds to delete the files. Unfortunately, using wildcard
characters with DEL is both dangerous and very convenient. An easy way to
"reality test" a DEL command with wildcard characters is to issue a DIR
command with the same wildcards first. Some examples:
C: DEL CONFIG.DOC (Delete the CONFIG.DOC file from current directory.)
C: DEL \BIN\*.BAT (Delete all of the files with a BAT extension
in the BIN directory of the current drive.)
C: DEL A:\*.* (Delete all files in the ROOT directory of drive A.)
DEVICE is a command line that appears in the CONFIG.SYS file. DEVICE lines are
used to implement device drivers when the PC starts up. Device drivers are
programs that modify the way the PC's operating system works. Device drivers
are often used to allow a PC to work with a new piece of equipment. For
example, a device driver might let DOS access a hard disk with a 300 megabyte
partition, use a new scanner, create a "DOS" command to use the PC's internal
speaker, or use RAM memory as a disk - the possibilities are endless.
Creating a new DEVICE line in CONFIG.SYS is frequently part of the installation
procedure for a new piece of hardware. The format for DEVICE is:
DEVICE = DRIVE:\PATH\FILE
DEVICE = \HDRIVE.SYS (Run the HDRIVE.SYS device driver from the
root directory of the current disk drive.)
DEVICE = D:\BIN\SPEAKER.SYS (Run the SPEAKER.SYS device driver from
from BIN directory of drive D.)
DEVICE = C:\VDISK.SYS /2 /9 /L256 (Using various parameters, run VDISK.SYS
from drive C to create a virtual disk.)
A handful of device names exist in DOS that identify various system components.
These device names cannot be used to name files. Device names in DOS include:
■ AUX: The AUXiliary device - typically a remote PC through a phone line.
■ COMx: Serial communications port. COM1 is the 1st serial port, COM2 the 2nd.
■ CON: The CONsole, refers the screen for output and the keyboard for input.
■ LPTx: A parallel port line printer - either LPT1, LPT2, or LPT3.
■ PRN: A generic term for the printer, often used interchangeable with LPTx.
■ NUL: The null device - also known as "the bit bucket", or oblivion.
Devices can be treated in DOS command much like files. Some examples:
Copying keystrokes │ C: COPY CON CONSOLE.TXT <RETURN>
to a file on disk │ These keystrokes will be copied to the console. <RETURN>
through the CONsole │ <CTRL + Z> <RETURN> (Message appears: "1 file copied")
Copying keystrokes │ C: COPY CON PRN
to the printer │ These keystrokes will be copied to the printer. <RETURN>
through the CONsole │ <CTRL + Z> <RETURN>
Copy file to printer │ C: COPY NOTES.TXT PRN ..Or.. C: COPY NOTES.TXT LPT1
The DIR command produces directory listings from disk drives. DIR can be
followed by a filename, directory disk path, or wildcard characters. The
resulting display will depend on the information requested. The DIR command
uses the following parameters:
/P - Displays the directory one screen at a time.
/W - Displays the directory in the WIDE format.
Some examples:
C: DIR /P (Display the current directory one screen at a time.)
C: DIR *. (Display all subdirectories & files without
filename extensions in the current directory.)
C: DIR \BIN (Display a subdirectory of the ROOT dir called BIN.
A file called BIN will not respond to this command.)
C: DIR *.DOC /W (Show all the DOC files in the wide format.)
DISKCOMP is used to compare the contents of a source and target disk drive.
Specify the same drive letter twice when you wish to compare two disks when you
only have one drive. DOS will prompt you to insert and remove both disks as
needed. Some examples:
C: DISKCOMP A: B: (Compare the disks in drive A and B.)
C: DISKCOMP A: A: (Compare two disks in drive A. Prompt me
to insert and remove disks, as necessary.)
DISKCOPY makes a copy of a diskette. To use DISKCOPY simply follow the command
by a SOURCE and DESTINATION drive letter. It is important to remember that the
first drive listed will be treated as the source drive. You can make a copy of
a diskette if you only have one disk drive by specifying the same drive twice.
DOS will prompt you to insert and remove diskettes as needed. DISKCOPY makes a
complete copy of a disk including all subdirectories. This makes DISKCOPY
easier to use than the COPY command whenever making copies of diskettes with
subdirectories. Some examples:
C: DISKCOPY A: B: (Copy the disk in drive A onto drive B.)
C: DISKCOPY A: A: (Copy a disk in drive A onto another disk in drive A,
Prompt me to insert and remove disks, as needed.)
Various CONTROL key combinations are available while in DOS. These key
combinations are literally formed by holding down the CONTROL key while
pressing some other key. The main set of CONTROL key combinations comes from
pressing CONTROL with the letters of the alphabet, A through Z. When many of
these keys are pressed, a caret and letter appear. For example, pressing
CONTROL+R causes "^R" to appear. CONTROL key combinations with special
control functions in DOS are listed here.
CONTROL + C - Terminate the current command or program.
CONTROL + J - Insert a physical end to the DOS command line,
repositioning the cursor on the next line.
CONTROL + S - Freeze the screen display.
CONTROL + Q - Resume screen display after pressing CONTROL+S.
CONTROL + P - Send/stop sending (toggle) screen content to printer.
Be certain a printer is connected and on before
pressing CONTROL+P!
CONTROL + Z - Insert an End-of-file marker in a text file. CONTROL+Z
is used with the COPY CON command. (See DEVICE NAMES)
SHIFT + PrtSc - Dump the screen contents to the printer.
ALT + Numeric - Display the character associated with the number of the
Keypad ASCII value typed on the keypad while holding the ALT key.
DOS functions as a one-line editor, accepting commands one line at a time.
Until the RETURN key is pressed, the command currently being worked on is kept
in a memory space called the COMMAND LINE BUFFER. The most recently issued
command is kept in another small memory buffer called the TEMPLATE. The list
below shows the keys used in the DOS "editor".
RETURN - Do It! Execute the current command!
F1 - Copy 1 character from the template to the command line.
F2 char - Copy characters up to "char" from template to command line.
F3 - Copy template to the command line (recall last command).
F4 char - Skip characters in template up to "char". The
fragment selected can then be recalled with F3.
F5 - Copy the command line to the template.
F6 - Place a CONTROL+Z (^Z) in the command line.
DELETE - Delete a character from the template.
INSERT - Insert mode toggle. Typeover is the default.
ESC - Escape, or void, the current command line input.
BACKSPACE - Delete character to left of cursor.
LEFT ARROW - Same as backspace.
RIGHT ARROW - Same as F1.
This topic details most of the changes that distinguish various versions of
DOS. If you're having persistent problems using a command you may discover the
cause here. DOS has evolved and grown in power with each successive release.
Many commands present in the current DOS don't exist in older versions and some
commands have added capabilities along the way. DOS HELP is based on 3.20, a
version still widely used. To check the DOS version, type "VER" at the prompt.
The original version of DOS has long since fallen into disuse. DOS 2.0 added
commands to work with hard disks and multi-level directories. DOS 2.X systems
create disk FAT (File Allocation Table) tables that are incompatible with large
hard disk volumes written under DOS 3.X. Such volumes are corrupted if written
to by DOS 2.X. DOS 2.X also lacks commands to support networked environments.
You should upgrade to version 3.20 or higher if you haven't done so already.
Differences exist between IBM's PC-DOS and MS-DOS bearing the same version
number. Commands released in a one are not always present in the other.
Although most of the information here is relevant to both, the following
notes refer to MS-DOS.
DOS 2.1 added the PROMPT command and fixed various bugs in version 2.0. The
following screens list changes made in later versions of DOS.
DRIVEPARM is a command line that appear in the CONFIG.SYS file that lets you
define parameters for block devices when DOS starts up. DRIVEPARM is not a
command that the average user should need to use.
DRIVEPARM might appear in CONFIG.SYS in a line similar to the one shown here:
DRIVEPARM=/D:01 /C /F:1 /H:2 /S:9 /T:80
Parameters used with DRIVEPARM Include:
/D: Indicates a logical drive number from 0 to 255 (0="A", 1="B", etc.)
/F: Indicates drive form factor (0=360K/1=1.2meg/2=720K/3=8" single
density/4=8" double density/5=hard disk/6=tape drive/7=other)
/H: Indicates the maximum head number (1 to 99)
/N: Indicates nonremoveable block device
/S: Indicates the number of sectors per track (1 to 99)
/T: Indicates the number of tracks per side (1 to 999)
ECHO is DOS command used in batch files. ECHO determines whether or not
command displays are sent to the screen. ECHO is typically used at the start
of batch files to streamline the look of the file as it executes. Command
output is not affected by ECHO. DIR and other commands still send their
output to the screen when ECHO is set to OFF.
ECHO - Show ECHO status
ECHO ON - Turn screen commands on
ECHO OFF - Turn screen commands off
ECHO String - Send the String to the screen as a message
ECHO. - Insert a blank line on screen. The period must immediately
follow the ECHO command.
NOTE: In DOS 2.X, blank lines are echoed by typing a space after ECHO and
════ pressing RETURN. For blank lines in DOS 3.0, follow ECHO with CHR 255
by holding down the ALT key while typing 255 on the numeric keypad.
The DOS environment is a memory space maintained by DOS that contains variable
information. This information can be referred to by any program running under
DOS. The DOS environment represents a place where programs and processes can
leave messages for each other. You can see the contents of the environment by
typing the command "SET" at the prompt.
The environment typically contains the COMSPEC, which shows the location of the
command processor, and the PATH, which shows where the system looks for
executable files. A PROMPT variable may also appear if the system prompt has
been altered. Any number of user defined variables may also be present.
You can use the SET command to place your own variable values into the
environment. This ability can be used when writing batch files. "IF"
statements in batch files can check user variables in the environment and
alter the action of the file depending on what is found.
The size of the DOS environment can be enlarged by using the /E parameter with
COMMAND.COM. This be done as part of the PC startup procedure by using COMMAND
in the shell statement of CONFIG.SYS.
Here are some examples of escape sequences that can be used with the ANSI.SYS
device driver. The ESC character (ASCII 27) can be created in most text
editors by holding down the ALT key, typing 27 on the numeric keypad, and
releasing the ALT key. Escape sequences start with ESC () followed by the
open square bracket ([). This is followed by a parameter, which is usually a
number, and a command identifier, typically a letter. The command identifier
identifies the type of action being performed by the escape sequence. Consult
a DOS reference work for a complete list of these escape sequences.
──────────────────────── Video Attributes & Modes ───────────────────────
(Set character attributes to normal.)
(Turn reverse video on.) (Also: 1=Bold, 4=Underscore, 5=Blink)
(Clear the Screen, home the cursor.)
40H (Move the cursor to the 12th row and 40 column.)
=4h (Enter the 320 x 200 graphics mode on a color monitor.)
(Give characters a green foreground and a blue background color.)
───────────────────────────── Key Definitions ───────────────────────────
113p ("A" becomes "Q") │ 8;"dir";13p (F10 becomes DIR+<RETURN>
7;60p (F9 becomes "<") │ 49p ("1" is redefined as "1")
"Hi!"p ("a" becomes "Hi!") │ 8;0;68p (F10 is redefined as F10)
EXE2BIN is a DOS utility program that converts files with the .EXE file
extension to a binary (.BIN) or command (.COM) file format. As shown below,
EXE2BIN is followed by an input and output filename.
EXE2BIN C:\OLDFILE C:\PRG\NEWFILE.BIN
In this case EXE2BIN will convert a file called OLDFILE.EXE found in the root
directory of drive C into NEWFILE.BIN in the PRG subdirectory of drive C.
It is possible to run a "child" version of DOS by using a shell command in an
application program or running COMMAND.COM while at the DOS prompt. The EXIT
command passes system control back to the previous, or "parent" command
processor, if there is one. This command processor can be an application
program such as BASIC, which has a shell statement from which a new command
processor can be run, or another version of the DOS command processor itself.
To use the EXIT command simply type "EXIT" at the prompt in DOS as shown below
C: EXIT
If you had left an application by shelling out to a new version of COMMAND.COM,
typing EXIT returns you to that application in the state you originally left
it.
NOTE: Any changes made to the DOS environment space while in child version of
the DOS command processor are lost when the EXIT command is used.
FCBS is a command line that appears in the CONFIG.SYS file. FCBS lets you
specify the number of File Control Blocks (FCBs) that can be open at one time.
The FCBS line appears in CONFIG.SYS as shown below:
FCBS = X,Y
The "X" represents the number of files that can be opened by FCBs at a time.
This number can range from 1 to 255. The default value for this factor is 4.
The "Y" tells DOS the number of files opened by FCBs that cannot be closed
automatically when an application tries to open more than the number of files
specified by X. Thus the command:
FCBS = 5,2
provides for five files to be opened by FCBs at one time. DOS will not
automatically close the first two of these files opened if an application
tries to open more than five files.
The FC command compares the contents of two files. The result of this
comparison can be sent to a file, a printer, or the screen. Some of the
parameter information used with FC is listed here.
/A - Abbreviate the output of ASCII comparison.
/B - Force a byte by byte binary comparison of both files.
/C - Make the comparison process case insensitive.
/L - Compare the files as ASCII text files.
/N - Display line numbers when performing an ASCII comparison.
/T - Causes tabs to be compared as tabs rather than spaces.
/LBn - Set internal line buffer to "n" lines.
C: FC NEW.COM OLD.COM /L (Compare NEW.COM to OLD.COM as text files.)
C: FC NEW.TXT OLD.TXT /B (Compare NEW.TXT to OLD.TXT as binary files.)
C: FC NEW.DOC OLD.DOC /L /C (Compare NEW.DOC to OLD.DOC as ASCII text
files, make the comparison case insensitive.)
C: FC NU.DOC OLD.DOC /L /N (Compare NU.DOC to OLD.DOC as ASCII text files
& show numbers for lines that don't match.)
The optional three character extension at the end of DOS filename is typically
used to indicate what kind of file it is. The meanings of most file extensions
are determined by individual programs that use them to identify the files they
work with. Most file extensions other than EXE, COM, and BAT, represent the
use of conventions set by users and programmers, not requirements set by DOS.
For example, two word processing programs might both give their files a "DOC"
extension but still produce incompatible files. You can make new file
extensions for your own organizational purposes. Some common file extension
conventions are listed here.
BAT - Batch File OVL - Overlay File ASM - Assembly source code
COM - Command File HLP - Help File COB - COBOL Source Code
EXE - Executable File WK1 - Lotus Worksheet FOR - FORTRAN source code
TXT - ASCII Text File DAT - Data file PAS - PASCAL Source code
SYS - System File DBF - Database File C - C Source code
BAK - Backup File FNT - Font File BAS - BASIC program/source
DOC - Document FON - Font File OBJ - Object Code
ARC - Archive File DRV - Driver File CHK - CHKDSK Recovery File
CNF - Configuration File
FILES is a command line that appears in the CONFIG.SYS file. FILES lets you
specify the maximum number of files the system can access at the same time.
This line appears in CONFIG.SYS as follows:
FILES = N
Where "N" is a number from 8 to 255. The default value for FILES, if no
command is given is 8.
NOTE: Individual application programs sometimes require that you increase the
number associated with the FILES command as part of their software installation
procedure. Some applications may require this number be 20 or even higher.
DOS filenames can be up to eight characters long. The filename can also be
followed by an optional extension that is up to three characters long. A
period must appear between the filename and its extension. Filename extensions
are typically used to identify the type and characteristics of files. DOS
filenames, like most DOS commands, are case insensitive.
Valid DOS filename characters include the letters A to Z, numbers 0 to 9, and
the following characters: ! @ # $ & _. The following characters cannot be used
in DOS filenames: " / \ . [ ] : | < > + = , ;.
───── DO NOT USE SPACES IN DOS FILENAMES! ─────
DOS reserves the following device names: AUX, COMx, CON, LPTx, PRN, and NUL.
Below is a list of valid DOS filenames. Note how all filenames with extensions
have a period between the filename and the extension.
COMBAT.EXE @NOTES@.TXT JUNE ROGER.WK1 CHAPTER2
12_22_66.DOC MYFILE.COM DOSAID.INI 22$$$.DAT #56
FILESPEC is short for FILE SPECIFICATION. The filespec tells DOS everything it
needs to know to locate a file. A filespec can include:
■ A disk drive letter
■ A path showing directories and subdirectories
■ A filename
■ A filename extension
A filespec can be up to 64 characters long. The following filespec:
C:\WORD\MAY\LETTER.DOC
Tells DOS that a file named LETTER with a DOC extension can be found in the MAY
subdirectory of the WORD directory on drive C. The "\" character is called a
path separator. It is used to separate the various levels shown in the path.
Here are some more filespecs:
A:\BIN\UTILITY.DAT
B:\COMMAND.COM
D:\WP\UTIL\PRINT\PRINTER.TXT
The FIND filter locates and displays all the lines in the target files that
contain the string specified in the command. The search string must always be
enclosed in quotes. FIND used these parameters:
/C - Display only a count of the number of lines in which the search string
occurs, not the lines themselves.
/V - Display all lines that don't contain the search string.
/N - Display the relative line number of each line the string is found in.
C: FIND "Idaho" ST.TXT (Display all lines in STATE.TXT which
includes "Idaho".)
C: FIND /V "Idaho" ST.TXT (Display all lines in ST.TXT that don't
include "Idaho".)
C: FIND /C "Idaho" ST.TXT (Display the number of lines containing
"Idaho" in the ST.TXT file.)
C: FIND /N "Idaho" ST.TXT (Display the relative number of each line
that contains "Idaho" in ST.TXT.)
FOR..IN..DO is a command used in BATCH files and interactive file processing.
FOR..IN..DO lets DOS execute a command repeatedly for a given set of elements.
There are two formats for this command. The first format is for use in batch
files, the 2nd format is used at the DOS prompt in interactive file processing.
FORMAT 1 (Batch Files): FOR %%variable IN (set) DO command
FORMAT 2 (Interactive processing): FOR %variable IN (set) DO command
FOR..IN..DO performs a DOS command once for each element present in the set.
Wildcard characters can be used as part of the set. Some examples:
C: FOR %A IN (P R S) DO DIR %A*.* (Do three directory listings - one for
all files beginning with the letters
"P", "R", and "S".)
FOR %%D IN (A.C B.C C.C) DO DEL %%D (While executing a batch file, delete
three files named A.C, B.C, and C.C.)
C: FOR %F IN (*.TXT) DO TYPE %F (Type to screen all of the TXT type
files in the current directory.)
The FORMAT command is used to prepare a hard disk or diskette surface for use
by DOS. FORMAT analyses a disk for bad sectors and creates a DOS boot sector,
FAT tables and root directory. FORMAT uses the following parameters:
/4 - Format a 360K diskette in a 1.2 meg high density disk drive.
/V - Prompt for a VOLUME name after the disk is formatted.
/S - Copy the operating system files onto the new disk.
C: FORMAT A: (Format a 360K diskette in drive A,
assuming it is a normal 360K drive.
C: FORMAT A: (Format a 1.2 meg diskette in drive A,
assuming it is a high density 1.2 meg drive.
C: FORMAT A: /4 (Format a 360K diskette in drive A, assuming
it is a high density 1.2 meg drive.)
C: FORMAT B: /V /S (Format a disk in drive B, prompt me for
a Volume label, and transfer the system
files, making it a bootable diskette.)
GOTO is a DOS command that can only be used in a batch file. GOTO is always
used with a label. A label is a named line in a batch file consisting of a
word preceded by a colon (:MYLABEL). GOTO transfers the action of the batch
file to the location of the label it names. GOTO can be used in IF statements
to create conditional branching. Here is an example:
GOTO DETROIT (Branch to the routine following the DETROIT label)
The short batch file listed below keeps repeating the DIR /W command over and
over again if it finds a file named MYFILE.DOC. The GOTO statement at the end
of the file sends the action back to the label named LOOP at the beginning.
In such cases the batch file can be stopped by pressing CONTROL+C.
:LOOP
DIR /W
IF EXIST MYFILE.DOC GOTO LOOP
Spaces are not allowed in labels between the leading colon and the label name.
The GRAFTABL command loads additional character data into memory so that a CGA
(Color Graphics Adapter) monitor can display the ASCII characters from 128 to
255 while in graphics mode. These characters include various block graphics
and foreign language symbols. Here is an example of the GRAFTABL command:
C: GRAFTABL (Load character data into memory so that ASCII characters with
values from 128 to 255 can be displayed on a color graphics
adapter while in graphics mode.)
The GRAPHICS command lets you print a graphic screen on a compatible printer
from a CGA (Color Graphics Adapter) monitor. The GRAPHICS command has the
following options:
COLOR1 - Print on Industry-Standard PC Color Printer with a black ribbon.
COLOR4 - Same as COLOR1 but print with RGB (red, green, blue, black) ribbon.
COLOR8 - Same as COLOR1 but use a CMY (cyan, magenta, yellow, black) ribbon.
COMPACT - Print on Industry-Standard PC Compact Printer.
/R - Print "reverse", black and white as seen on monitor.
/B - Print background in color with the COLOR4 and COLOR8 options.
/F - Rotate the printout 90 degrees.
/C - Center the printout on the page. This works only with 640 x 200
or with 320 x 200 screens when using the /F parameter.
C: GRAPHICS /R (Enable graphics screen dumps for a standard
graphics printer. Black and white will
be printed as seen on the monitor.)
C: GRAPHICS COLOR4 (Enable graphics screen dumps for a standard
graphics printer using an RGB ribbon.)
The IF command is used in BATCH files where it provides conditional control of
program flow. The general format of the IF command is:
IF <NOT> CONDITION COMMAND
If the condition is met, then the command is executed. Optionally, a "NOT"
clause may be added. If so, then the condition must NOT be met in order for
the command to be executed. Three types of conditions can be tested in an IF
statement. The first condition tests for an ERRORLEVEL number, a number the
system keeps to check on error conditions. The second condition compares one
string to another. This comparison is case sensitive. The third type of
condition tests for the existence of a file. Some examples:
IF NOT EXIST TED.DOC COPY A:\TED.DOC (If the TED.DOC file doesn't exist in
the current drive, copy TED.DOC from
drive A to the current drive.)
IF %1==GO GOTO NO (If the 1st thing placed after the batch file on the DOS
command line is the word "GO" then goto the "NO" label.)
IF ERRORLEVEL 1 ECHO Problem! (If an ERRORLEVEL of 1 exists, echo "Problem!")
JOIN joins one disk drive to another by treating it as a directory of the
drive being joined to. When this happens the system accesses the drive that
has been joined whenever the directory it was joined as is being addressed.
The system won't recognize a drive letter that has been joined as a valid drive
until the JOIN command is undone. The format of the JOIN command is:
JOIN DRIVE BEING JOINED AS NEW DRIVE/DIRECTORY
The /D parameter is used with JOIN to break the connection formed by a previous
JOIN command. When JOIN is used by itself without any trailing information, a
list of the current JOIN commands in effect are displayed. Some examples:
C: JOIN (Show me the JOIN commands currently in effect.)
C: JOIN B: C:\STORE (JOIN drive B to drive C so that I can now address
drive B as the STORE directory of drive C.)
C: JOIN A: /D (Undo the JOIN command which joined drive A.)
┌─KEY+──NORMAL───ALT───SHIFT──CTRL─┬──ALT+──┐ Extended key codes include
│ F 1 ··· 59 ··· 104 ··· 84 ··· 94 │ 1··120 │ the various key combinations
│ F 2 ··· 60 ··· 105 ··· 85 ··· 95 │ 2··121 │ shown on this screen.
│ F 3 ··· 61 ··· 106 ··· 86 ··· 96 │ 3··122 │
│ F 4 ··· 62 ··· 107 ··· 87 ··· 97 │ 4··123 │ All extended keys return a 2
│ F 5 ··· 63 ··· 108 ··· 88 ··· 98 │ 5··124 │ BYTE string - a "0" followed
│ F 6 ··· 64 ··· 109 ··· 89 ··· 99 │ 6··125 │ by the number shown here. For
│ F 7 ··· 65 ··· 110 ··· 90 ·· 100 │ 7··126 │ example the code for F1 is 0,59
│ F 8 ··· 66 ··· 111 ··· 91 ·· 101 │ 8··127 │ and the code for ALT+T is 0,20.
│ F 9 ··· 67 ··· 112 ··· 92 ·· 102 │ 9··128 ├─────────────────────────────────┐
│ F 10 ·· 68 ··· 113 ··· 93 ·· 103 │ 0··129 │ Up······72 Home····71 │
├──────────────────────────────────┴────────┤ Down····80 End ····79 │
│ ······· ALT+ ····· ALT+ ····· ALT+ ······ │ Left····75 PgUp····73 │
├──────────┬──────────┬──────────┬──────────┤ Right···77 PgDn····81 │
│ A···30 │ H···35 │ O···24 │ V···47 │ Ins ····82 Shift │
│ B···48 │ I···23 │ P···25 │ W···17 │ Del ····83 TAB···15 │
│ C···46 │ J···36 │ Q···16 │ X···45 ├─────────────────────────────────┤
│ D···32 │ K···37 │ R···19 │ Y···21 │╔═════════╗ ═ PLUS ═ PgUp·132 │
│ E···18 │ L···38 │ S···31 │ Z···44 │║ CONTROL ║ Left···115 PgDn·118 │
│ F···33 │ M···50 │ T···20 │ -··130 │║ KEY ║ Right··116 Home·119 │
│ G···34 │ N···49 │ U···22 │ +··131 │╚═════════╝ PrtSc··114 End··117 │
Each disk volume has an optional eleven character label assigned to it. The
LABEL command is used to display, create, or edit this volume label. If the
LABEL command is typed without additional information, a short menu appears.
The current volume label is then displayed and an option to change or delete
this label is presented. Following the LABEL command with a new label on the
command line assigns that label to the disk volume. Some examples:
C: LABEL (Display the current label on drive C. Provide the
option to add, delete, or change the volume label.)
C: LABEL MYDISK (Change the label on drive C to MYDISK.)
In batch files, LABELS provide conditional branching of program action when
used with the GOTO command.
LASTDRIVE is a command that appears in the CONFIG.SYS file. LASTDRIVE sets
the last, or highest, logical drive letter the system can access. Thus if you
wanted to set the last logical drive letter to "K", the following command would
appear in your copy of CONFIG.SYS:
LASTDRIVE = K
There are several factors that affect your system's need to access additional
drive letters. They are:
■ The existence of multiple partitions on large hard disks
■ The existence of disk volumes provided by a network
■ Use of the SUBST command to create virtual drives
If no LASTDRIVE command appears in CONFIG.SYS the system assumes a default
value of "E", indicating that access is available for five drives (A to E).
The make directory command is spelled as either MD or MKDIR. MD is used to
create disk directories. If no disk drive is specified the current drive is
assumed. Subdirectories within other directories can be created provided disk
space exists and the path leading to any particular directory is no longer than
64 characters long. Some examples:
C: MKDIR \MAIL\NOTE (Make a directory called NOTE which is a
subdirectory of the MAIL directory which
itself is a directory in the ROOT directory.)
C: MD A:\FILES (Make a subdirectory in the root directory
of drive A called FILES.)
The MODE command is used to create settings by which the screen, printers, and
serial communication ports are used. MODE uses the LPT1, LPT2, LPT3, COM1, and
the COM2 device names to address line printers and serial communications. The
default printer settings are for LPT1, using 80 characters per line at six
lines per inch. The MODE command can be used to transfer the active display
between monitors on systems equipped with both a monochrome and color monitor.
Some examples:
C: MODE LPT2:132,8 (Activate the 2nd parallel port printer. Print
132 columns to a line and 8 lines to the inch.)
C: MODE COM2:1200,n,8,1,p (Activate the 2nd serial communications port. Set
it to 1200 baud, with no parity, 8 stopbits, and
1 databit, to work with a serial printer (p).)
C: MODE MONO (Set the video mode to monochrome.)
C: MODE CO80 (Set the video mode to 80 columns, color monitor.)
C: MODE CO40 (Set the video mode to 40 columns, color monitor.)
The MORE filter pages the output of a process or command, displaying it one
screen at a time. When the screen fills up with material MORE stops the action
and displays the string "--More--" at the bottom of the screen. Touching any
key brings up the next screen. MORE is used by piping the output of another
command or process into the MORE filter. Some examples:
C: DIR | MORE (Display the contents of the DIR command, sending
it to the screen one "page" at a time.)
C: TYPE A.TXT | MORE (Display the contents of the A.TXT file, one
screen at a time.)
The PATH command tells the system where to search for executable files.
Whenever DOS is asked to run a program it first searches the current directory.
If DOS doesn't find a file in the current directory, it looks for a PATH to see
what additional directories it should search. One solution to the error
message "BAD COMMAND OR FILE NAME", is to extend the system search path to
include some often used disk directories. Writing a PATH command into your
AUTOEXEC.BAT file will help insure that the system can find the files it seeks.
Placing a semicolon (;) in a PATH command tells the system to return to the
root directory and start a new search path. The APPEND command plays a
complementary search function for DATA files. Some examples:
C: PATH (Display the current search path for executable
files.)
C: PATH ; (Set the program search path to no path.)
C: PATH C:\SALT;\TUTOR (Search the SALT directory of drive C for
executable files (Programs). Return to the ROOT
directory and search the TUTOR directory.)
PAUSE is a command used in batch files. The function of PAUSE is to stop the
action of the file and wait for a key to be pressed by the user. When the
command . . .
PAUSE
. . .appears in a batch file, action stops and the message:
Strike a key when ready . . .
appears. The file resumes running when ANY KEY is struck. PAUSE is very
useful in giving users a chance to read screen instructions before they fly
off the screen. Other uses for PAUSE involve giving users chances to insert
and remove diskettes or to terminate the action of a batch file by pressing
CONTROL+C.
PIPING allows one program's output to be used as another program's input. To
accomplish this DOS creates temporary files called pipes. The symbol used to
accomplish piping is the vertical line (|). This line appears between the
input and output process in all piping commands.
A FILTER is a command that reads data from a file or process and modifies, or
filters, the data in some way. SORT, which modifies the content of a file or
process by sorting it, is an example of a filter. By using piping you can make
a filter receive input from another file or command.
Piping and Filters are often used with another DOS feature called REDIRECTION.
Examples of piping and filters are listed here and on the next screen.
C: DIR | SORT (Execute a DIR command. Use piping with the SORT
filter to make an alphabetically sorted listing.)
C: DIR | SORT | MORE (Execute a DIR command, but use one pipe to SORT
the display and another to page the display one
screen at a time.)
The PRINT command is used to send files to a printer as a background task so
that work can continue while printing takes place. PRINT works by establishing
a print queue from which files are sent to be printed. If the PRINT command is
issued without any additional information, the contents of the print queue will
be displayed. PRINT uses the following parameters:
/D: - Set the DOS print device, LPT1, LPT2, COM1, etc. PRN is the default.
/B: - Set the size of the print buffer. 512 bytes is the default.
/Q: - Set the number of files in the print queue (4 to 32). Default is 10.
/T - Delete, or terminate, all files from the print queue.
/C - Cancel specific files listed on the command line from the print queue
until a /P parameter is encountered.
/P - Add files on the command line to the print queue until a /C parameter
is encountered.
The next screen shows several examples of the PRINT command.
The PROMPT command is used to change the DOS system prompt. PROMPT can also be
used to send ANSI.SYS escape sequences to the CONsole. All the parameters used
with PROMPT in the list below must be preceded by a dollar sign. The
parameters used with the PROMPT command are:
t - The time d - The date p - The current path
v - DOS version n - Default drive g - The ">" character
b - The "|" character q - The "=" character l - The "<" character
h - A Backspace s - A leading Space _ - CR & Line feed
e - ESCape character. (Always used with "$" and an open square bracket ($e[).)
C: PROMPT (Reset the prompt back to the default prompt.)
C: PROMPT Monday (Set the prompt to the word "Monday".)
C: PROMPT $P$G (Set prompt to show the current directory path
followed by ">" character, for example, "C:\BIN>".)
C: PROMPT $e[0m (Send an escape sequence that uses ANSI.SYS to
turn the screen character attributes back to
normal (nonblinking white on black).)
RECOVER reclaims files or disks that contain bad sectors. RECOVER is used by
following the command with the name of the drive or file you wish to recover.
If no parameters are including, RECOVER recovers the current drive. When a
disk is recovered the reclaimed files are named FILE0001, FILE0002, FILE0003,
and so forth, each with the extension REC. Some examples:
C: RECOVER A: (Recover drive A. Assign new names to the
files on drive A beginning with FILE0001.REC.)
C: RECOVER C:\STORE\YES.DAT (Recover the YES.DAT file in the STORE direc-
tory of drive C. Do not rename the file.)
Redirection allows the output of a process to be sent to a destination other
than the screen. Redirection also lets programs receive input from a source
other than the keyboard. There are three DOS redirection symbols as follows:
> Assign the output of a process to a file or device. If the file named
in the command exists, overwrite it.
>> Assign the output of a process to a file, but APPEND the output to an
existing file, rather than overwriting it. If need be, create the file.
< Assign input used by a process to a file. All input for that process
will now come from the specified file, rather than the keyboard.
════════════════ Examples: ASSIGNING NEW OUTPUT ═══════════════
C: DIR > NEWFILE (Run the DIR command, & send its output to a file named
NEWFILE, deleting any existing file called NEWFILE.)
C: DIR *.BAT > PRN (Run the DIR command to get a listing of all BAT files.
Send the output to a printer, rather than the screen.)
The REM command is used in batch files to display comments, or REMarks, during
execution. A REM line in a batch file might appear as follows:
REM This is a REMARK that will appear when this file is run!
REM lines are not displayed when ECHO is turned off. Remarks can be up to 123
characters long.
Unlike most programming languages, REM statements in batch files don't act as
internal remarks. You can create internal remarks by using labels. A batch
file LABEL is any line that starts with a colon (:). Labels are read only
until a space is encountered. Any colon followed by a space and then text
is therefore an "unreadable" label that can be used as an internal remark.
Any text separated by a space behind a legitimate label can also be used
this way. These two cases are shown here:
: This internal remark is ignored when the batch file is run.
:MAY This is a remark placed after a functional LABEL named MAY.
The REMOVE DIRECTORY command is spelled as either RD or RMDIR. The RD command
is used to remove directories from a disk. Before a directory can be removed,
all the files and subdirectories within it must first be deleted. Some
examples:
C: RMDIR TOOLS (Remove the TOOLS subdirectory from the current directory.)
C: RD A:\TEMP (Remove the TEMP directory from root directory of drive A.)
The RENAME command is used to rename files. RENAME can be abbreviated as REN.
Renaming a file does not make a copy of it and the original file name is lost
once it is renamed. Wildcard characters (* and ?) can be used with the rename
command. As shown below, RENAME is used by following REN with the current
filename and the new name desired.
REN CURRENTNAME NEWNAME
Some examples:
C: REN HELLO GOODBYE (In the current directory, rename the "HELLO"
file "GOODBYE".)
C: REN *.AAA *.ZZZ (In current directory, renamed all the files with
an AAA extension so that they have ZZZ extensions.)
C: REN A:\LSA\B*.* G*.* (Rename all files in the LSA directory of drive A
that begin with a "B" so that they begin with a
"G" instead.)
The function of the REPLACE command is to allow easy updates of old software
with new. REPLACE selectively replaces files on a target disk with files
bearing the same name from a source disk. The REPLACE command format is:
REPLACE DRIVE:\PATH\FILES DRIVE:\PATH\FILES
(Source Disk) (Destination Disk)
Here are some of the parameters used with the REPLACE command:
/A - Add new files to the target disk rather than replacing old ones.
The /A parameter cannot be used with /D or /S.
/D - Replace files on target disk only if files on the source disk are newer
than files on the target disk. /D is incompatible with /A.
/P - Cause a prompt to be given before replacing a target file.
/R - Replace read-only as well as other files. REPLACE stops if an attempt
is made to replace read-only files without the use of this parameter.
/S - Search all subdirectories of the target directory.
/W - Wait for a key to be pressed before replacing files.
The RESTORE restores files backed up by the BACKUP command. The format of the
RESTORE command is:
RESTORE DRIVE:\PATH\FILES DRIVE:\PATH\FILES
(Source Disk) (Destination Disk)
The SOURCE disk contains the files to be restored on the DESTINATION disk.
Parameter switches used with the REPLACE command include:
/M - Restore only files modified since the last BACKUP.
/N - Restore only files that don't exist on the target disk.
/S - Restore any subdirectories as well the current directory
/P - Prompt for permission to restore any read-only or hidden files.
/A: - Restore only files modified on the target disk on or AFTER a given DATE.
/B: - Restore only files modified on the target disk on or BEFORE a given DATE.
/L: - Restore only files modified on the target disk on or AFTER a given TIME.
/E: - Restore only files modified on the target disk on or BEFORE a given TIME.
The SET command creates user defined variables in the DOS environment. The
format for SET is:
SET VARIABLE=STRING
When the SET command is used by itself, the contents of the DOS environment
is displayed. The DOS environment typically contains a COMSPEC showing the
location of the command processor, a search PATH if one has been set, the
system PROMPT if it has been redefined, and any variables created by previous
SET commands. Variables created by the SET command can be sensed by programs
and IF statements in batch files. Testing done for such variable strings is
case sensitive and must be exact. SET can be used to remove a variable from
the environment by setting it equal to nothing. Some examples:
C: SET (Display the contents of the DOS environment.)
C: SET BRANCH=YES (Create a variable called BRANCH in the DOS
environment. Make it equal to the string "YES".)
C: SET BRANCH= (Remove the BRANCH variable from the environment.)
The SHARE command is used to install file sharing and locking. SHARE is
typically used in the AUTOEXEC.BAT file and would be used only when Microsoft
MSNET is active. Parameter switches used with SHARE include:
/F:nnn - Where "nnn" is the number of bytes allocated as file space for
DOS to record file sharing information. Default is 2048 bytes.
/L:locks - Determines the number files that can be locked. Default is 20.
Once SHARE has been used, DOS checks all files for the read-only attribute
whenever read and write requests are made. Only read-only files can be shared
in a network. The ATTRIB command can be used to control the read-only file
attribute. Some examples:
C: SHARE (Install file sharing and locking for use with MSNET.)
C: SHARE /F:4096 (Allocate 4096 bytes of memory for DOS to record
file-sharing information. The default is 2048 bytes.)
C: SHARE /L:26 (Allocate the number of files that can be locked at
one time. The default is 20.)
The SHELL command appears in the CONFIG.SYS file. SHELL lets you specify a
command processor other than COMMAND.COM, DOS's default command processor.
The SHELL statement might appear in CONFIG.SYS as follows:
SHELL = C:\BIN\FILENAME.COM
where FILENAME.COM is a program being used as the new command processor. In
this case the system is being told to locate this file in the BIN directory on
drive C. You must make certain to include the path leading to the file you
wish to use in any SHELL statement.
NOTE: The new program listed in a SHELL statement that replaces COMMAND.COM
must be able to handle the system's input and output chores. It's a good
precaution when altering the CONFIG.SYS file in this way to have a bootable
diskette handy. Changes made in CONFIG.SYS can prevent you from booting back
into your system through a hard disk and you may need a separate bootable
diskette to regain access to the system so that CONFIG.SYS can be edited.
The SHIFT command is used in batch files. SHIFT lets a batch file process more
than the nine pieces of parameter information (%1 to %9) normally allowed to
follow a batch file name on the DOS command line. SHIFT works by shifting
parameter values down in number each time it is used. Thus the 10th parameter
becomes the 9th, the 9th parameter becomes the 8th, and so on.
In the example below, a batch file called NEW.BAT is executed at the DOS prompt
with 14 pieces of parameter information behind it - the letters A to M followed
by the word END. The SHIFT command shifts the higher numbered parameters into
place as %1, echoing each one to screen in turn, until %1 is made equal to the
word "END", which ends the program.
C:> NEW A B C D E F G H I J K L M END
:LOOP
ECHO %1
SHIFT
IF %1==END GOTO FIN
GOTO LOOP
:FIN
The SORT filter sorts the contents of a file or process alphabetically.
Parameter switches used with SORT include:
/R - Use REVERSE alphabetic order in the SORT. "Z" will come before "A."
/+nn - Where "nn" is the column number SORT uses to sort the file.
A "/+9" causes SORT to sort a file in an order determined by the
text found in the 9th column onward in each line.
SORT is typically used with commands that involve piping and redirection.
Some examples:
C: SORT < OLD.DOC (Sort OLD.DOC and show result on screen.)
C: SORT < OLD.DOC > NEW.DOC (Sort OLD.DOC and write the result to a
file named NEW.DOC.)
C: SORT /R < OLD.DOC (Sort OLD.DOC in reverse order so that
Z comes before A.)
C: DIR | SORT /+10 (Produce a DIRectory list that is sorted
by the 10th column (file extension).)
The SUBST command is used to create virtual drives by linking a disk path with
a drive letter. The format for the SUBST command is:
SUBST NEW VIRTUAL DRIVE LETTER: EXISTING DISK PATH
Using SUBST with no trailing information shows the SUBST commands currently in
effect. The "/D" parameter is used to delete a virtual drive created by a
previous SUBST command. The next drive letter available must be used when
issuing a new SUBST command. Once SUBST is executed you'll be able to use the
new drive letter to address the disk path it has been linked to. Certain
commands, including CHKDSK and LABEL, will not work on drives created by SUBST.
Some examples:
C: SUBST (Show me the SUBST commands currently in effect.)
C: SUBST E: B:\BIN (Create a virtual drive "E" which corresponds to
the BIN directory on drive B.)
C: SUBST E: /D (Undo the virtual drive "E" created by a previous
SUBST command.)
The SYS command is used to copy the DOS system files, IO.SYS and MSDOS.SYS,
from one disk to another. This action is necessary when creating a bootable
diskette or when updating the version of DOS on a disk. System files are
hidden and can't be copied by the COPY command. The SYS command format is:
SYS TARGET DRIVE:
In order to make a disk bootable the COMMAND.COM file must also be included.
SYS doesn't copy COMMAND.COM. Use the COPY command for this purpose. If you
are formatting a new diskette, the "/S" parameter switch of the FORMAT command
can also be used to transfer system files to the new disk. Since ordinary
files may occupy space that needs to be reserved for system files, you should
use the SYS command with disks that are formatted but still free of files.
Some examples:
C: SYS A: (Transfer the systems files from drive C to drive A.)
A: SYS C: (Transfer the systems files from drive A to drive C.)
There are four DOS system files: IO.SYS, MSDOS.SYS, COMMAND.COM, & CONFIG.SYS.
The first two are hidden files that cannot be copied by the COPY command or
listed with DIR. These files can only be transferred from one disk to another
with the SYS command or by using the /S parameter with the FORMAT command when
formatting a new disk. The files minimally required to produce a bootable
diskette are IO.SYS, MSDOS.SYS and COMMAND.COM. Here is a brief description:
■ IO.SYS: This file is the Input/Output system file. IO.SYS represents a
low level of the operating system that performs fundamental and primitive
input/output operations similar in function to the ROM BIOS chips.
■ MSDOS.SYS: The next step up in the operating system. MSDOS.SYS contains the
DOS service routines - especially those routines that relate to interactions
with disk drives.
■ COMMAND.COM: Is the most important system file from the user's point of view.
This file interprets what we type while at the DOS prompt and processes our
commands. COMMAND.COM contains "internal" commands like DIR, REN, DEL, etc.
■ CONFIG.SYS: Provides the system with configuration information on boot-up.
While not needed to start up, it is a functional necessity on most systems.
The TIME command is used to display or set the current system time. The
command is used simply by typing TIME at the DOS prompt. You are then given a
chance to enter a new time in the following format:
HOURS (0-23) : MINUTES (0-59) : SECONDS (0-59) : HUNDREDTHS (0-99)
Changing the system time with the TIME command changes the time stamp placed on
files when they are altered or copied. It is important to remember that using
TIME does not permanently change the real time clock in AT style systems,
unless DOS 3.3 is being used. For that purpose the SETUP.COM program must be
run. The situation with PC/XT systems can also vary. See the discussion of
this matter included with the DATE command. An example:
C: TIME 17:02:15.00 (Set the system time to zero hundreds of a second,
at 15 seconds past 2 minutes past five PM.)
TREE displays the paths for all the directories on a disk. The format for the
TREE command is:
TREE DRIVE:
When the optional /F parameter switch is used, TREE displays the names of the
files in each directory. Some examples:
C: TREE A: (Show the directory tree of the disk in the A
drive.)
C: TREE /F (Show the directory tree of C and the contents
of each directory.)
C: TREE /F > CFILES (Run TREE using the /F parameter to show the
contents of each directory. Use redirection to
write the display normally sent to the screen to
a file called CFILES.)
The TYPE command is used to display the contents of a file to the screen. The
format of the TYPE command is:
TYPE DRIVE:\PATH\FILENAME
TYPE works best with text files. TYPE can be used to display binary or
executable files but may produce unpredictable results. TYPE cannot be used
with the "?" and "*" wildcard characters. CONTROL+S can be used to freeze the
screen display when using TYPE. Use CONTROL+Q to resume the display after
pressing CONTROL+S. The MORE filter can be used to show the contents of a
TYPEd file one screen at a time. Some examples:
C: TYPE A.TXT (Display to screen the contents of the A.TXT file.)
C: TYPE A:\22.TXT (Display to screen the contents of the 22.TXT file
residing on in the root directory of drive A.)
C: TYPE EDIT.DOC | MORE (Display the contents of the EDIT.DOC file. Pipe
the output of this display to the MORE filter so
that each screen pauses as it is displayed.)
VDISK.SYS is a device driver file that maintains a virtual, or RAM, disk. VDISK
is used in a DEVICE line in the CONFIG.SYS file. A RAM disk is an piece of RAM
memory that is used like a disk drive. Files can be read and written in a RAM
disk as if it were an ordinary disk drive. The advantage of a RAM disk is that
being memory it is much quicker than a conventional disk drive. The problem is
that the contents of a RAM disk disappears when the machine is shut off!
The VDISK device line must show the drive and path leading to VDISK.SYS. In
addition, the following parameter information is added to VDISK.SYS:
/n - Where "n" is the # of sides, 1 or 2, for single or double sided drive.
/n - Where "n" is the number of Sectors per track, either 8, 9, or 15.
/Lnnn - Size in kilobytes of memory reserved for virtual disk. 64K is default.
/E - Lets VDISK make use of extended memory above 1 megabyte.
DEVICE = C:\BIN\VDISK.SYS /2 /9 /L256 /E
The example above shows a line in CONFIG.SYS. VDISK.SYS is located in the BIN
directory of drive C. The virtual drive is double sided, has 9 sectors/track,
reserves 256K memory, and uses extended memory above the 1 megabyte range.
VER displays the DOS release version number presently install in the system.
When troubleshooting software, or writing batch files, it is sometimes useful
to know what version of DOS is being run. To use VER, simply type the command
at the DOS prompt. A message similar to the one shown below will be displayed.
MS-DOS VERSION 3.20
An example:
C: VER (Show me what version of DOS is being run.)
The VERIFY command tells DOS to verify that data has been written to disk
correctly. VERIFY is followed by either the terms "ON" or "OFF" which turn the
verification function on or off. The VERIFY command simply shows the current
verification status if it is used by itself. VERIFY serves the same purpose as
using the /V switch with the COPY command. Because the system pauses to read
the disk after writing to disk, write operations take more time when VERIFY is
turn on. Some examples:
C: VERIFY (Show the current state of the VERIFY switch.)
C: VERIFY ON (Tell DOS to verify data written to disk.)
C: VERIFY OFF (Tell DOS not to verify data written to disk.)
VOL is used to display the volume label of a disk. The format for VOL is:
VOL DRIVE:
If no drive letter appears in a VOL command, the current drive is assumed. The
LABEL command can be used to change the current volume label. The /V parameter
switch can also be used with the FORMAT command to prompt for a volume label
when first formatting a disk. Some examples:
C: VOL (Display the volume label of drive C.)
C: VOL B: (Display the volume label of drive B.)
Wildcard characters are used in DOS commands to stand in for other characters,
much as a wildcard does in a deck of cards. This feature of DOS is also called
PATTERN MATCHING. With wildcards it is possible for a single DOS command to
affect many files at the same time. The two wildcard characters are the
question mark (?) and the asterisk (*). The question mark stands for any
single character. The command:
DIR ?able
brings up a directory display of all files with five character names whose last
four letters are "able". This might include TABLE, SABLE, CABLE, etc. The
asterisk is used to stand in for multiple characters. Thus the command:
DIR S*.*
shows a directory listing of all files that begin with the letter S. Note that
a second asterisk must be used after the period that occurs between the
filename and the extension. Some examples:
*.* (All files in the current directory)
A*.BAT (All batch (BAT) files that begin with the letter "A")
M??T.* (All files beginning with an M, ending in T with a 4 character name)
Like COPY, the XCOPY command is used to copy files. Unlike COPY, XCOPY is
capable of copying the subdirectories of a directory being copied in a single
command. The format of the XCOPY command is:
XCOPY DRIVE:\PATH\SOURCE FILES DRIVE:\PATH\TARGET FILES
If a target location for the source files is omitted, XCOPY will copy into the
current drive and directory. XCOPY uses these parameters:
/A - Copy files that have their ARCHIVE bit set, but don't reset the bit.
/M - Copy files that have their ARCHIVE bit set, and turn the bit off.
/D: - Copy files modified on or after a specified DATE, eg, /D:3-07-85.
/E - Copy any subdirectories, even if EMPTY. /E must be used with /S switch.
/P - PROMPT the user before creating each target file.
/S - Copy all SUBdirectories of source directory unless they are empty.
/V - VERIFY each target file as it is created.
/W - WAIT for a key to be pressed before executing the XCOPY command.
Because it is capable of copying multiple directories and their contents
with a single command, XCOPY is very powerful. The next screen contains
several examples of the XCOPY command.
DOSHELP is easy to use. Simply move to a topic and press RETURN.
Press F1 to get HELP. Press ESCAPE while in help to return to the
screen you left. For help using the PATH, COLOR, & QUIET KEYBOARD
(Mouse On/Off) parameters, enter DOSHELP ? at the DOS prompt.
~~~~~~~~~
Suggestions and comments for improving DOSHELP are welcome. I'm
also looking for PC related support, training, documentation, or
consulting work and could package company manuals in software like
this. Send correspondence to: P.O. Box 60231, Florence, MA 01060.
Richard Guenette Spring 1990
┌─────────────────────── MAIN MENU KEYS ─────────────────────────┐
│ ■ RETURN Key - Select a menu item and display it. │
│ ■ ARROW Keys - Move one menu item UP, DOWN, LEFT, or RIGHT. │
│ ■ LETTER Key - Move to an item beginning with that letter. │
│ ■ HOME or PgUp - Move to the TOP of a menu column. │
│ ■ END or PgDn - Move to the BOTTOM of a menu column. │
│ ■ ESCAPE Key - EXIT the program and return to DOS. │
│ ■ MOUSE Keys - LEFT = Return ∙∙∙∙∙∙∙∙∙∙∙∙ RIGHT = Escape │
└──────────────────────────────────────────────────────────────────┘
─────────────────────── Copying Text To DOS ───────────────────────
DOSHELP can copy text from one of its screens into DOS. With this
feature you can run DOSHELP, select the material you need, and exit
to DOS. The selected text will be displayed above the DOS prompt.
┌───────────────── To Copy Text From DOSHELP to DOS: ─────────────────┐
│ │
│ 1) Select a topic and press ALT+C. A blinking cursor appears. │
│ │
│ 2) Move the cursor to one end of the text to be copied and press │
│ RETURN. Then move to the other end of the desired text and │
│ press RETURN. The selected text will appear in reverse video. │
│ │
│ 3) A message appears telling you to press RETURN to copy the text │
│ and EXIT to DOS, or press ESC to escape the copy text process. │
│ │
│ ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ MOUSE KEYS ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ │
│ LEFT = Return MIDDLE = Alt+C RIGHT = Esc │
└──────────────────────────────────────────────────────────────────────┘
┌────────────────────── Using Topic Sub-Menus ─────────────────────┐
│ │
│ DOSHELP lets you move directly between related items without │
│ returning to the main menu screen. Many topics have a menu │
│ at the bottom of the screen consisting of one or more related │
│ topics. The topic selected appears in reverse video. When │
│ RETURN is pressed, the currently selected item is displayed. │
│ │
│ These keys are available from the topic screens: │
│ │
│ ■ RETURN - Move to the main menu, topic, or next screen. │
│ ■ RIGHT ARROW - Move RIGHT to the next topic on the sub-menu. │
│ ■ LEFT ARROW - Move LEFT to the next topic on the sub-menu. │
│ ■ SPACEBAR - Same as RIGHT ARROW. │
│ ■ ALT+C - Initiate procedure to COPY topic text to DOS. │
│ ■ CONTROL+C - Same as ALT+C. │
│ ■ F1 - Get HELP. Press ESC to return from help. │
│ ■ ESC - Return to the Main Menu. │
│ ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ MOUSE KEYS ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ │
│ LEFT = Return MIDDLE = Alt+C RIGHT = Esc │
└────────────────────────────────────────────────────────────────────┘
High set characters include block graphics and foreign language
characters as well as mathematical and monetary symbols. These
characters can be displayed by holding down the ALT key while
typing the number of the desired character on the NUMERIC KEYPAD.
─────────────────────────────────────────────────────────────────────────────
128·Ç 144·É 160·á 176·░ 192·└ 208·╨ 224·α 240·≡
129·ü 145·æ 161·í 177·▒ 193·┴ 209·╤ 225·ß 241·±
130·é 146·Æ 162·ó 178·▓ 194·┬ 210·╥ 226·Γ 242·≥
131·â 147·ô 163·ú 179·│ 195·├ 211·╙ 227·π 243·≤
132·ä 148·ö 164·ñ 180·┤ 196·─ 212·╘ 228·Σ 244·⌠
133·à 149·ò 165·Ñ 181·╡ 197·┼ 213·╒ 229·σ 245·⌡
134·å 150·û 166·ª 182·╢ 198·╞ 214·╓ 230·µ 246·÷
135·ç 151·ù 167·º 183·╖ 199·╟ 215·╫ 231·τ 247·≈
136·ê 152·ÿ 168·¿ 184·╕ 200·╚ 216·╪ 232·Φ 248·°
137·ë 153·Ö 169·⌐ 185·╣ 201·╔ 217·┘ 233·Θ 249·∙
138·è 154·Ü 170·¬ 186·║ 202·╩ 218·┌ 234·Ω 250 ·
139·ï 155·¢ 171·½ 187·╗ 203·╦ 219·█ 235·δ 251·√
140·î 156·£ 172·¼ 188·╝ 204·╠ 220·▄ 236·∞ 252·ⁿ
141·ì 157·¥ 173·¡ 189·╜ 205·═ 221·▌ 237·φ 253·²
142·Ä 158·₧ 174·« 190·╛ 206·╬ 222·▐ 238·ε 254·■
143·Å 159·ƒ 175·» 191·┐ 207·╧ 223·▀ 239·∩ 255
══════════════════ Examples: APPENDING OUTPUT ═════════════════
A: DIR >> C:\FLOPDIR (Create a directory of drive A and append it
to a file called FLOPDIR on drive C. NOTE:
This could be used to make a master file of
all your floppy disk directories!)
C: CHKDSK >> PRN (Run CHKDSK, but print the results on a printer
instead of the screen. In this instance,
using ">" is the same as using ">>".)
══════════════════ Examples: ASSIGNING INPUT ══════════════════
C: SORT < PHONE.TXT (Run SORT, using the PHONE.TXT file as input.)
C: MORE < START.BAT (Page the output of START.BAT to the screen
using the MORE filter.)
C: DEBUG < HI.BAT (Assign the contents of HI.BAT as input to DEBUG.
In other words, use the characters in HI.BAT as
if they were keystrokes typed in DEBUG.)
Here are more examples of DOS commands involving the use of pipes and filters:
C: DIR | SORT > PRN (Execute a DIR command, SORT it, and send
the results out to a printer.)
C: DIR | FIND "11-86" (Execute a DIR display of all files that contain
the "11-86" string - Or those that were created
in November 1986.)
C: SORT < LIST >> TEXT (Sort the LIST file in alphabetical order and
append the results onto a file called TEXT.
Create TEXT if it doesn't already exist.)
C: DIR *.EXE | SORT > TEXT (Execute a directory of all EXE type files, and
sort the result. Write these results to a file
named TEXT, deleting any previous file by that
name in the process.)
C: MORE < DIRLIST > PRN (Display the DIRLIST file one screen at a time
with MORE, but send the results out to the
printer rather than the screen.)
C: COPY OLD.EXT NEW.EXT (Copy OLD.EXT as NEW.EXT in current directory.)
C: COPY OLD.EXT A:\ (Copy OLD.EXT from the current directory on
drive C to the ROOT directory of drive A.)
C: COPY C:\BIN\*.BAT C:\MAY (Copy all files with a "BAT" extension from the
BIN directory of C to the MAY directory of C.)
C: COPY A.EXT+B.EXT A:/D.EXT (Combine A.EXT & B.EXT as ASCII text files from
the current directory in drive C into the
D.EXT file in the ROOT of drive A.)
C: COPY A:\SEE.COM (Copy SEE.COM from the ROOT directory of Drive
A into the current directory of drive C.)
C: COPY AUTOEXEC.BAT CON (Copy the AUTOEXEC.BAT file to the screen.)
C: COPY CON NEWTEXT (Copy keystrokes to the CONsole to make NEWTEXT
file. Copy the file when CTRL+Z is pressed.)
C: COPY CONFIG.SYS PRN (Copy the CONFIG.SYS file to the printer.)
PRINT Command Examples:
C: PRINT MY.TXT (Print MY.TXT as a background task on the default
print device, PRN.)
C: PRINT A:\DOC B:\NEW (Add the DOC file from drive A and the NEW file
from drive B to the print queue.)
C: PRINT /Q:12 /B:2048 (Allow 12 files to sit in the print Queue. Set
the print Buffer to 2048 bytes.)
C: PRINT /D:LPT2 MY.TXT (Set the print Device to LPT2. Print MY.TXT as
a background task on LPT2.)
C: PRINT /C MY.TXT (Remove MY.TXT from the print queue.)
C: PRINT /T (Delete all files from the print queue.)
REPLACE Command Examples:
C: REPLACE C:\MODEM\*.BAT C:\BIN (Replace all files with a BAT extension
in the BIN directory with files of the
same name from the MODEM directory.)
C: REPLACE C:\MODEM\*.BAT C:\BIN /D (Replace files with a BAT extension in
the BIN directory which have newer
versions in the MODEM directory.)
C: REPLACE *.BAT C:\BIN /A (Add all the files with a BAT extension
in the current directory to the BIN dir.
Do not copy over any BAT extension files
already found in the BIN directory.)
C: REPLACE *.BAT C:\BIN /S (Replace all the BAT extension files
found in BIN with files of the same
name from the current directory.
Search any subdirectories of BIN and
do the same thing.)
C: RESTORE C: A: /P (Restore files from the BACKUP directory of
drive C onto A. Prompt for permission to
restore hidden or read-only files.)
C: RESTORE A: C:\EDIT /M (Restore files from drive A to the EDIT
directory on drive C. Restore only files
that have been modified since last backup.)
C: RESTORE A: C:\EDIT /S (Restore files from drive A to the EDIT dir
and any subdirectories of EDIT as well.)
C: RESTORE A: C:\*.COM /B:01-01-87 (Restore files from drive A which have
a COM extension to the root directory
of drive C. Restore only files
modified on or before Jan 1, 1987.)
C: RESTORE A: C:\ /A:02-01-87 /L:4:00p (Restore files from drive A to
the root dir of drive C which
have been altered on, or since,
2/1/87, and at a time later than
four PM on any given day.)
C: XCOPY 123.ASM STORE Copy 123.ASM from the current directory. If
STORE doesn't yet exist as a directory,
prompt me to find out if 123.ASM should be
copied as a file called STORE, or copied
into a newly created directory named STORE.)
C: XCOPY C:\BIN\*.DOC A:\TANK\ (Without prompting, copy all files with a
DOC extension in the BIN directory on
drive C into the TANK directory of drive
A. If necessary, create the TANK
directory on drive A.)
C: XCOPY C:\ D:\ /S (Copy the contents of drive C, including all
directories not empty, into D. Create
similar directories in drive D as needed.)
C: XCOPY C:\ C:\BIN\ /A /V (Copy all files in C's ROOT directory whose
archive bits are set into the BIN directory.
Don't change the archive attribute of the
files copied. Verify each copy operation.)
─────────────────────── DOS 3.0 ───────────────────────
This was the first version of DOS that supplied commands designed to support
networked environments. These commands were new to this version:
ASSIGN COUNTRY LASTDRIVE VDISK.SYS
ATTRIBUTE FCBS SHARE KEYB
The /R and /B parameter switches were added to the GRAPHICS command. Three new
parameters were added to the PRINT command: /D, /B, and /Q.
─────────────────────── DOS 3.1 ───────────────────────
The new commands in version 3.1 were: JOIN LABEL SUBST
The BACKUP and RESTORE commands in 3.1 were made to support any combination of
diskette media, single or double-sided, 320K, 360K, 720K, or 1.2 meg. The
FILECOMP command added these new parameters: /A, /L, /Lb n, /N, and /T.
─────────────────────── DOS 3.2 ───────────────────────
DOS 3.2 was a major upgrade which added these commands:
DISKCOMP FDISK STACKS
DRIVEPARM GRAFTABL TREE
DRIVER.SYS RAMDRIVE.SYS XCOPY
REPLACE
The ATTRIB command was given the ability to set the file archive bit for use by
the BACKUP and XCOPY commands. The /E parameter was added to COMMAND to allow
the size of the DOS environment to be changed. DISKCOPY was made to work with
unformatted disks and format only the first side of a disk. FORMAT acquired
the /1, /4, and /8 parameters.
GRAPHICS could now use /C to center a printout, /F to rotate it 90 degrees, and
/P to assign the printer port it used. A Dvorak keyboard could be assigned by
typing KEYBDV at the prompt (3.2 only). Finally, the MODE command was allowed
to redirect printer output with the command: MODE LPTn=COMn, where "n"
specified the parallel and serial port numbers used.
─────────────────────── DOS 3.3 ───────────────────────
DOS 3.3 added these features:
CHMP CALL DOG.BAT --- Returns to original BAT file after running DOG.
COMPARE @dos command --- Turns ECHO OFF when specified command runs.
FASTOPEN SELECT DISPLAY.SYS
In 3.3, TIME and DATE make permanent changes in the system clock. The /LCD
switch was added to let GRAPHICS print screens from a laptop liquid crystal
display. /X and /E were added to APPEND. The maximum BUFFERS assignable in
CONFIG.SYS was reset from 99 to 255. KEYB was modified to support two letter
keyboard codes. Several CODEPAGE clauses were added to the MODE command which
also now supports a speed of 19200 BAUD in the serial communication ports.
─────────────────────── DOS 4.0 ───────────────────────
The big new feature of 4.0 is the DOSSHELL command which creates an optional
visual interface to replace the DOS prompt. SMARTDRV.SYS, SWITCHES, and MEMORY
are new commands. MODE supports COM3 and COM4 ports, assigns columns and lines
on some displays and has a /STATUS switch. REM lines can appear in CONFIG.SYS.