Internal Commands - files containing programs that are automatically copied to RAM when the computer is turned on. Sometimes referred to as resident commands.
COPY
DIR
ERASE
DATE
TYPE
RENAME
TIME
VER
External Commands - files containing programs that the user must first copy into ran before using. Why not put all DOS programs in RAM?
FORMAT.COM
CHKDSK.COM
DISKCOPY.COM
BASIC interpreter stored in BASICA.COM or QBASIC.EXE
Editor to edit DOS files. Old versions stored in EDLIN.COM, new versions stored in EDIT.COM
There are about 100 other DOS programs stored in files. Thankfully, you won't need many of these.
KEYB.COM MODE.COM SYS.COM MIRROR.COM LOADFIX.COM ASSIGN.COM After DOS loads the resident commands, it looks for two files:
The commands in CONFIG.SYS relate in one way or another to your hardware.
If you add a device to your set up, there's a good chance you will have to update CONFIG.SYS.
Buffers=15
Files=20
Buffers: When DOS reads from a disk or prepares to write to a disk, it moves the information in groups of bytes rather than one at a time. As it collects this information, DOS stores it temporarily in specially reserved portions of memory called buffers. The buffer command allows you to tell DOS the number of buffers you need.
Files: The Files command tells DOS how many files may be open at one time.
Note: You will probably never have to alter this file unless you accidently erase it.
AUTOEXEC.BAT is an example of a batch file.
A batch file contains a set of commands that DOS can carry out as a sequence instead of stopping after each command and waiting for you to type the next one, as it would normally do.
This file contains a set of commands that you would want issued every time the computer is turned on. For example, you may want to automatically run a virus detection program, exit the program, the change to a new path.
The following AUTOEXEC.BAT file contains commands to automatically execute a virus scanner program.
C:\VIRUS\VSAFE /1+/2 /3 /4+/5+/6+/7 /8+ C:\VIRUS\CPAV.EXE /C C:\VIRUS\BOOTSAFE
C:\>
This prompt means that the active drive is the C drive. When you issue a command to DOS, it will look for the necessary data or programs on the C drive.
If the computer is on a network, the prompt may point to a network drive:
N:\>
The prompts can be changed to point to either the A or B drive.
C:\>A:
A:\>
When would you want to change the prompt to the A drive or B drive?
The FORMAT command is used on new disks.
Note: If you issue a format command on a disk that already has data on it, you will lose that data.
If you want to format a floppy disk, place it in either the A or B drive. Then issue the command:
C:\>FORMAT A:
or
C:\>FORMAT B:
DOS will respond with the following message:
Insert new diskette for drive A:
and press ENTER when ready...
After you hit enter, DOS displays a series of messages. When the format is complete, DOS may ask you to enter a volume label:
Volume label (11 characters, ENTER for none?)
A Volume label appears when DOS reports on a disk's contents. A volume label is optional. Most users elect to just hit ENTER.
Then DOS will report the total disk space, the bytes available for use, and whether any portion of the disk is damaged.
DOS will then ask you:
Format another (Y/N)?
Answer accordingly.
The FORMAT command has many options. See a DOS manual for special options.
To see the contents of a disk in drive A, type:
C:\>Dir A:
To see the contents of the C: drive, type:
C:\>Dir
What will the following commands do?
A:\>Dir
C:\>Dir B:
B:\>Dir B:
? The Wildcards *
As files accumulate on disk, you can forget exactly how you spelled a file name. Sometimes you'll also want to copy, delete, or otherwise work with a group of related files. To help on both counts, DOS uses ? and *
MEMO1.DOC
MEMO13.DOC
MEMO11.DOC
MEMO2.DOC
MEMO10.DOC
MEMO15.
What would the following commands yield?
Dir Memo??.doc
Dir Memo*.*
Creating Directories
Because hard disks (and even floppy disks) can get rather crowed, DOS allows you to create directories. Directories simply allow you to organize your files. By keeping all the files of a similar type in one directory, it is easier to find a specific file.
All directories start from the root directory and branch into lower levels.
For example, my harddrive has the following directories:
C:\> Root Directory
C:\WP51> Stores my WordPerfect application programs and some of my documents
C:\dbase> Stores my dBase application programs, my databases, and database reports
C:\VIRUS> Contains my virus scanner programs
In addition, I further divided my WordPerfect directory into:
C:\WP51\DISSER>
C:\WP51\MIS103>
C:\WP51\MIS485>
These directories are organized hierarchically:
Suppose you only started out with a hard drive and wanted to replicate my directories.
Here are the commands:
C:\>md wp51
C:\>md dbase
C:\>md virus
C:\>md \wp51\disser
C:\>md \wp51\mis103
C:\>md \wp51\mis485
C:\>cd wp51
DOS will return with:
C:\wp51>
To return to a directory higher in the tree, type cd..
C:\wp51\cd..
DOS will return with C:\>
To remove the disser directory, first activate directory
C:\>cd \wp51\disser
DOS will return:
C:\WP51\DISSER>
Erase all files:
C:\WP51\DISSER>erase *.*
DOS will ask you if you are sure. Respond affirmatively. Then go to the parent directory:
C:\WP51\DISSER>cd..
DOS will respond
C:\WP51>
Type the RM command and directory you wish to be deleted.
C:\WP51>rd disser
Create a copy of a file, with a new name, to the same storage device
Copy a file with the same name to another storage device
Copy a file, with a new name, to another storage device
Copy source destination
C:\>Copy C:Granny.Doc A:
C:\>Copy A:Granny C:
C:\>Copy A:Granny
C:\>Copy Granny A:
C:\>Copy Granny
A:\>Copy Granny C:
Copy with a wildcard:
C:\>Copy Memo*.* A:
C:\>Copy Memo??.doc B:
Because DISKCOPY makes a character-by-character duplicate, it works only with disks of the same size and capacity.
DISKCOPY source: destination:
Copy disk in drive A to the disk in drive B:
C:\>diskcopy a: b:
Copy disk in drive B to the disk in Drive A:
A:\>diskcopy b: Use same drive to copy disk:
C:\>diskcopy a: a:
A:\>diskcopy
CHKDSK source:
C:\>Chkdsk
33462272 bytes total disk space
143360 bytes in 7 hidden files
73728 bytes in 29 directories
28579840 bytes in 931 user files
4612096 bytes available on disk
10240 bytes in bad sectors
2048 bytes in each allocation unit
16339 total allocation units on disk
2252 available allocation units on disk.
In the unlikely event you get a message "X lost allocation units in y chains", consult a DOS manual to re-chain the allocation units into 1 file.