Version 1.00 of DOS (Disk Operating System) was released in 1981 for the IBM PC. The policy of maintaining backwards compatibility has been followed in subsequent versions. The system editor included with DOS is "edlin" which is a line-editor. A new full screen editor "edit" has been included in DOS version 5.00. Most word processing packages facilitate screen-oriented editing in a non-document format.
Standard operating system commands that are built into DOS (such as DIR) are referred to as permanent, internal, or resident. Other commands are contained in separate files; these commands are referred to as temporary or external. When using a hard disk system it is good form to store external commands in a directory of their own.
Cold boot Turn on the micro using the power switch at the left back of the Eazy-PC
Warm boot When the micro is on, press and hold both the[Ctrl] and[Alt] keys, then press the[Del] key. This resets the computer, erases the information from RAM and reloads DOS
When you boot DOS, the monitor displays a prompt asking for the current date and time. You may hit[Return) twice to bypass this option and get directly to the system prompt:
This indicates that the hard drive (which is drive C) is the default drive. All DOS commands will act on this drive unless otherwise specified. DOS commands can be entered at the system prompt and executed by hitting[Return). If a DOS command is typed incorrectly, the monitor will display an error message:
Bad command or file name
This message means that DOS did not understand the command. Check the spelling of the command and enter it again.
The default disk drive can be changed from the hard drive C to the floppy drive A by typing:
at the C> prompt. The default drive will now be A and the system prompt will be:
There must be a disk in floppy drive A.
*exit all utilities to get to the system prompt,
*remove the disk from drive A,
*turn off the computer.
NOTE: To protect the disk drive heads from damage make sure that the disk is removed from drive A and be sure that the drive light is out before shutting off the Eazy-PC.
* create and name files
* copy files to the same disk or to a different disk
* rename files
* view the contents of files
* remove files
The DOS naming convention is:
The filename consists of 1 to 8 characters which can be letters of the alphabet, certain special characters and the numbers from 1 to 9. In general, punctuation characters or brackets cannot be used in a filename. If you use an illegal character in a filename, you will get the following error displayed:
File creation error
The extension is optional but if used it consists of a period followed by zero to three characters.
Following are some examples of legal file names:
Filenames should be meaningful to reflect the contents of the file. Although they are legal, the last two examples are not good choices for filenames.
Some commonly used extensions are:
BAT batch (file of DOS commands)
COM command file
EXE executable file
SYS system (DOS)
a:info.txt the file info.txt on the floppy disk
c:info.txt the file info.txt on the hard disk
? represents any one character in a file name
* represents all characters in a filename or part of a filename
Some examples of using wildcards follow:
*.* all files with all extensions
*.bat all files with the .bat extension
assign.* all files with the filename assign with any extension
*.? all files with a one character extension
works?.doc all files of 5 or 6 characters starting with works and having the .doc extension
DOS has several control sequences (a combination of keys pressed simultaneously) that perform special functions:
[[CTRL] s] freezes the screen, typing any key causes display to resume.
[[SHIFT)[PrtSc]] dumps the current screen contents to the printer.
[[CTRL][PrtSc]] toggles continuous dump to the screen.
[[CTRL] z] is used to indicate end of file.
[[CTRL] c] is the customary 'kill' sequence.
* At the C> prompt type:
DOS then prompts:
Drive to format ?
* Respond by typing:
DOS prompts with:
Insert new disk in drive A
and press RETURN when ready
* Insert a new disk in drive A and press[RETURN]
DOS displays the following message as it starts to format your disk:
and proceeds to count to cylinder 79
DOS displays a message when formatting is complete;
Do you want to format another disk (Y/N)?
* Press[RETURN] for No. DOS displays the system prompt C>
dir[RETURN] lists the working directory of the default drive
dir a: [RETURN] lists the working directory of drive A
dir c: [RETURN] lists the working directory of drive C
del a:info.txt [RETURN] deletes info.txt from the working directory of drive A
del c:temp.bas [RETURN] deletes temp.bas from the working directory of drive C
Note that these examples are complete file specifications consisting of the drive letter, a colon, then the filename and extension.
copy works.inf works3.inf [RETURN]
Copies the file named works.inf to another file called works3.inf in the same directory and the same drive as works.inf. Two file exist in the same directory.
copy a:info.txt c:info.txt [RETURN]
Copies the file named info.txt from the floppy disk to the hard disk so that the file exists on both disks.
rename works.inf works3.inf [RETURN]
Changes the file named works.inf to another file called works3.inf in the same directory of the default drive. One file exists.
rename a:info.txt cover.txt [RETURN]
Changes the file named info.txt to another file called cover.txt in the same directory of the floppy drive. One file exists.
type works.txt [RETURN] Displays the contents of the file works.txt to the screen.
type a:works.txt [RETURN] Displays the contents of the file works.txt that is resident on the floppy disk to the screen.
Diskcopy a: a: [RETURN]
Chkdsk A: [RETURN]
displays the following report:
730112 bytes total disk space
39936 bytes in user files
690176 bytes available on disk
655360 bytes total memory
594384 bytes free
CON is the console device. The following is a simple method of creating a file from console input.
C> copy con a: fn.TXT
- (enter any number of lines)
[[CTRL] z] (terminate by typing[[CTRL] z] ]
PRN is the printer device. There can be up to 3 parallel printers - LPT1, LPT2, LPT3. Device name PRN is synonymous with LPT1.
AUX is the communications ports. There can be 2 ports - COM1, COM2.
Device name AUX is synonymous with COM1.
DOS Version 3.3 and higher also supports COM3 and COM4.
COMMAND.COM - the DOS command interpreter
CONFIG.SYS - contains configuration information
AUTOEXEC.BAT - contains the startup procedure
DOS expects to find these files in the root directory.
The "<" and ">" symbols can be used to redirect standard I/O.
e.g. type filename1.filetype > filename2.filetype
causes the output of the 'type' command to go to filename2.filetype rather than the screen.
e.g. sort < filename.filetype
indicates that input is to come from filename.filetype rather than the keyboard.
The "|" (pipe) can be used to take the output of one command and use it as the input for the next command.
e.g. type filename.filetype | more
DOS supports a tree-like directory structure. A path can contain several subdirectories; separate each with the "\" (backslash) character. The following commands are used to manipulate directories.
md path creates a directory
cd displays name of the current directory
cd path changes to the directory specified
cd .. moves backward one level to the parent directory
cd \ changes to the root directory
rd path removes a directory; this will abort if there are files in the
chkdsk /v displays all files and directories in the current drive
When a command is entered, DOS looks for it in the current directory. To instruct DOS to look elsewhere, use the "path" command. A series of paths can be defined by one command; separate each path with a semicolon.
e.g. PATH C:\ tells DOS to look in the root directory.
e.g. PATH C:\ ; C:\DOS tells DOS to look in the root directory or in the \DOS directory.
Place the path command in the AUTOEXEC.BAT file if a path is referred to frequently.
Note: use "append" rather than "path" to instruct DOS where to look for data files.
An entry at the prompt is assumed to be a command. DOS searches for this in the following order:
1. in the DOS commands
2. for a filename with a COM or EXE extension
3. for a filename with a BAT extension
Command files, also referred to as "batch files" must have a BAT extension. This type of file can contain:
commands - including the names of other batch files
display statements - syntax: rem string
replaceable parameters - syntax: %n where 0 < n < 9
(the actual parameter is entered on the command line)
Enter the name of a command file to begin execution of the file and type[[CTRL][BREAK)) to cancel execution. Note that when the name of a command file is encountered within the command file currently being executed, control passes to the named file and then back to the system.
The following is a summary of control statements.
echo on causes command names to be typed as they are executed
echo off turns echo off; note that the rem statement is not printed when echo off is toggled
echo message displays the message indicated
pause string displays the string and then "strike any key when ready" and then waits for user entry.
pause displays "strike any key when ready" and waits for user entry
if [not] condition command
executes the command if the condition is true
"condition" can be:
exist filename - DOS looks to see if the file exists
strings 1 == string 2 - DOS checks for equality
"command" can be any command including "goto"
label syntax: :label
shift moves parameter list to the left by one
if %1 =="" goto end
for %%p in (list) do command
values in 'list' are separated by spaces
%%p takes on each value in 'list'
'list' could be one replaceable parameter and the parameter entered in the command line could contain a wildcard specification
call batch-filename parameter_list
control reverts to the line following the call after the called file is executed.
attrib [setting(s)] file change attributes of a file
+r turn on read-only attribute
-r turn off read-only attribute
+a turn on archive attribute
-a turn off archive attribute
(the archive attribute is turned on if the file was changed since the last backup)
Use the /s option to apply the command to subdirectories.
attrib file shows current attribute settings
chkdsk drive: checks a disk (indicates files, bad blocks, etc.)
compare file1 file2 compares two files
copy file1 file2 copies a file
delete file deletes a file (same as erase)
dir lists files - a path or drive can be specified e.g. dir a:
diskcopy drive: drive: duplicates a disk (destination can be unformatted)
erase file deletes a file (same as delete)
format drive: [option(s)] initializes a disk; the Packard Bell computers have high density disk drives - refer to the Users Guide in the Consulting area for details on how to format a double density disk on a high density drive
/s create a bootable disk
/v allows you to enter a label for the disk
(label can be 1 to 11 characters)
label drive:new-label changes the label on the disk
command | more useful for typing (see the type command) large files, display pauses when the screen is full; type any key to continue
e.g. dir | more
e.g. type file | more
print file prints file(s) to the printer
rename file1 file2 renames a file
sort sorts using standard input and output.
Use redirection to specify files
e.g. sort <infile >outfile
type file displays contents of file(s)
ver responds with version number of DOS on disk
Viruses are programs that are designed to modify the behavior of a system in an unexpected manner. Some viruses are extremely dangerous, causing the deletion of files or the formatting of your hard disk.
The Computing Services Department has purchased a site license for FPROT, a virus protection program that allows you to check your disks for known viruses and to disinfect your disks. If you wish to obtain a copy of FPROT, take a formatted floppy disk to Computing Services and ask for a copy of FPROT. Documentation is included with the software.