home *** CD-ROM | disk | FTP | other *** search
-
- ████████████████████████████████████████████████████████████████
-
- DOS FOR BEGINNERS - A LOW STRESS INTRODUCTION
-
- ████████████████████████████████████████████████████████████████
-
- DOS stands for disk operating system. DOS is the software
- program which controls the primary input and output of your
- computer while you use an application program such as your word
- processor or database. Learning about DOS isn't that difficult
- after all. It seems that beginners live in fear of DOS. A better
- way to do things is to imagine that DOS is a kitchen of cooking
- tools and helpful chefs waiting for your instructions on what to
- fix for lunch. Here's the point of the analogy: you've got to be
- a little comfortable in the kitchen to live (no food - no you!)
-
- Same thing with DOS. Learn just a little and you can survive
- with the computer. But just as with the kitchen, a steady diet
- of peanut butter sandwiches may keep you alive (i.e., passing
- familiarity with only 4 or 5 DOS commands) but as with the
- kitchen, life is more flavorful eating a variety of things like
- fish, salad and dessert (i.e., a richer DOS diet of varying
- commands.)
-
- DOS or the disk operating system controls the flow of data to
- and from the screen, keyboard, disk drives, printers and of
- course the integrated circuit RAM (random access memory) chips
- wherein data is stored and processed. In as sense, DOS is the
- "verbal interpreter" through which your program (e.g., word
- processor) talks to the raw hardware. Somewhat like a person in
- a foreign land who needs a language interpreter.
-
- Over the years DOS has been produced in a variety of versions.
- New commands and capabilities have been added and different
- versions for a variety of machines have evolved. Thus you might
- bump into a version of DOS for a true IBM machine and a version
- of DOS for a machine manufactured by Tandy. PC-DOS is a version
- of the more general MS-DOS developed for 16-bit computers using
- the Intel-manufactured line of CPU microprocessor chips.
-
- DOS is a software program having MANY parts! It consists of one
- (or more) disk(s) having an input/output system, a command
- processor, and several utilities. Don't worry about all of this
- right now, just be aware that DOS has several parts. The
- utilities are small software program files which are found on
- your DOS disk. These utility files perform helpful tasks such as
- formatting a disk or checking it for errors. Since they are a
- part of DOS, they live on the same disk but are not needed all
- of the time (e.g., you may need to format disks only once or
- twice a week and thus occasionally use FORMAT.COM which lives on
- your DOS disk.) Thus these EXTERNAL disk-based utility programs
- live in the computer's RAM (random access memory) chips
- TEMPORARILLY while in use and usually are kept on the disk until
- needed. They are EXTERNAL commands. Other commands live inside
- RAM memory because they are used frequently and are INTERNAL DOS
- commands. The file FORMAT.COM is an example of an EXTERNAL
- COMMAND. An example of an INTERNAL COMMAND would be DIR. We will
- talk about these and other DOS commands later in this tutorial.
-
- Don't worry about this distinction now. Just remember that there
- are two basic types of DOS commands which will start to become
- more apparent as we delve deeper into DOS magic.
-
- ████████████████████████████████████████████████████████████████
-
- USING DOS THE EASY WAY
- DOS SHELLS AREN'T FOUND AT THE SEASHORE!
-
- ████████████████████████████████████████████████████████████████
-
- Before we start our main DOS tutorial a brief alternative:
-
- There is always an easier way to do anything - given enough
- time and ingenuity. If DOS commands and structure are not
- interesting or you don't have the time to learn DOS, there exist
- programs called DOS SHELLS which essentially provide DOS access
- for routine things like moving and copying files; these menu
- programs hide the DOS commands behind a series of "point and
- select" choices and options a little bit like the point and
- shoot menus you are using with PC-LEARN!
-
- The typical DOS shell is a package which surrounds DOS (like a
- shell, hence the name) and allows you to perform the most common
- DOS functions by pressing only one or two keys or moving a
- highlighted arrow. Very appealing for beginners! This may be
- all the DOS control most people need . . .
-
- This is a bit like using a cash machine at the bank. If you need
- to take money out of the machine, you insert your card, key in a
- password and press a few different choice buttons. DOS SHELLS
- provide a screen of DOS command CHOICES, allowing you to point
- the arrow or cursor at the task you want done. You see a menu of
- choices instead of a cryptic C> prompt.
-
- The tradeoff is that you may miss out some of the more subtle
- operations that direct contact with DOS can provide, but then
- sometimes it is easier to get the task accomplished without
- fancy sidetracking and confusion.
-
- There are two flavors of DOS shells: memory resident (stay put
- in the computer memory) - which are always available whether the
- DOS shell disk is in the machine or not. The second type, non-
- resident shells live on the disk and must be present in the disk
- drive to be used. Non resident DOS shells do not use active RAM
- memory continuously and thus free more memory space for your
- main program.
-
- Some DOS shells also have added features: security passwords and
- macros (the capability to cause one key or key combination to
- instantly type a long string of commands!) DOS shells are a good
- "beginners crutch" to let you work with the computer and its DOS
- operating system without having to learn the DOS commands and
- their somewhat arcane syntax.
-
- Some practical and easy DOS shell packages include: Still River
- Shell, DOS2ools, PC Tools, Powermenu, Automenu, Dirmagic and
- Directory Freedom. If you would like a shareware copy of
- Directory Freedom with colorful menus of choices which works
- and looks a little like PC-LEARN and allows you to issue many
- DOS commands with simple menus, contact the author of this
- package.
-
- If you are beginner and don't want to be troubled learning DOS,
- then a shell program is the easiest way to use the PC.
-
- ████████████████████████████████████████████████████████████████
-
- USING DOS - THE NUTS AND BOLTS
-
- ████████████████████████████████████████████████████████████████
-
- Next let's jump into our main DOS tutorial, for those intersted.
-
- Remember, there are TWO ways to use DOS. Directly at the prompt
- using what is termed a COMMAND LINE. This is the detailed method
- we will study in a paragraph or so. A second way is to use a DOS
- SHELL to manage files and other data, as we discussed
- previously.
-
- The following examples are best practiced at the DOS prompt A>
- or C> rather than within this tutorial. You might wish to print
- this tutorial and then practice the examples with your computer
- displaying a true DOS command line such as C>
-
- To print this tutorial, use the print file option from the main
- PC-LEARN menu.
-
- Now let's begin the tutorial:
-
- When you first turn on the computer with only the DOS disk in
- place, assuming some automatic startup software or menu program
- has not been installed, you will see the lonesome a> prompt or
- maybe c> prompt if you have a hard drive.
-
- The DEFAULT drive is the disk drive in which DOS will search for
- a program or file if no other specification to another drive is
- given. The prompt tells you which drive is the default drive at
- the moment. DOS can specify up to 63 drive names (not just a, b
- and c!)
-
- If a> is on the screen it is the DOS prompt and in this case the
- A: drive is the DEFAULT floppy drive which will be searched for
- information if you issue a command and ask DOS to execute it.
-
- You can CHANGE the default drive simply. Let's try switching
- drives.
-
- If you see a> try the following example:
-
- (example) b: <press enter or return key>
-
- The result on screen is now b>
-
- The computer now pays attention to b: (b drive). Hopefully there
- is a disk in b: drive or DOS gets confused and will give you an
- error message.
-
- If you have a hard drive (which is usually the c: drive,) you
- can try switching back and forth between your a: drive and c: in
- a similar manner. Try switching around between drives, go back
- and forth a few times. Switching drives is a VERY IMPORTANT
- SKILL, SINCE DOS PAYS ATTENTION TO THE DEFAULT DRIVE WHOSE
- LETTER IS DISPLAYED!
-
- Next let's try some other simple DOS commands. Try these . . .
-
- (example) a>ver <then press enter key>
-
- (example) a>time <then press enter key>
-
- (example) a>date <then press enter key>
-
- In the above examples, you first asked DOS to tell you what
- version of DOS you are using then a request to tell you the time
- and date. Get the idea? Type in a word or phrase and something
- happens. But just what are the words and phrases? Let's jump
- deeper . . .
-
- (example) a>dir/p <enter>
-
- You get a listing of files in the drive (hopefully a disk is in
- the drive.) Notice that we added /p to the end of a command. P
- is shorthand for "pause after each screenful." The DIR command
- means directory (a list of files or programs on the disk.) You
- can modify a basic DOS command like DIR with additional COMMAND
- SWITCHES and ARGUMENTS (e.g., /p) which are fancy words which
- simply imply modifications to a basic DOS command.
-
- Try this . . .
-
- (example) a>dir/w <enter> /w means "wide screen"
-
- (example) a>dir a: <enter> list a: drive contents
-
- (example) a>dir b: <enter> list b: drive contents
-
- You will notice that the DOS prompt stays with or in the default
- drive you started from but can examine another drive directory
- then COME BACK to the default drive from where you started.
- Another way of explaining this is that you can switch back and
- forth between drives (typing a: or b:) and ask for directories
- OR you can stay in a drive and ask DOS to look at either a: or
- b: independently of the default drive. Flexibility!
-
- Tip: A REMINDER: DOS is a computer operating system. Many of its
- commands once loaded stay inside the machine. As long as the
- power is on, these commands stay resident (stay put) and are
- called INTERNAL commands. DIR is an example of an INTERNAL
- COMMAND - it lives inside the computer once DOS is loaded.
-
- EXTERNAL COMMANDS however only live on the DOS disk and can be
- copied to other disks (example: SORT.COM). They load TEMPORARILY
- into the computer memory, do their job and then are gone.
- EXTERNAL DOS COMMANDS MUST HAVE A DOS DISK (OR COPY) of that
- command in a disk drive when you need them.
-
- While we are concentrating on DOS at the moment it is important
- to understand that DOS is only an operating system. DOS is the
- first step. The second step for most people is to use higher
- level (more useful) programs such as word processors, accounting
- systems, games (or whatever).
-
- These higher level APPLICATION programs are started by entering
- a simple word or instruction at the DOS prompt. For example, if
- you purchased a word processing disk it might instruct you to
- insert that special disk into the computer and type:
- a>start (then press enter key) The point is that DOS is a
- program which itself allows other more useful programs to be
- loaded into the PC and operated.
-
- TIME TO JUMP TO LIGHTSPEED!
-
- The listing which follows is a portion of the most useful DOS
- commands with examples and clarification tips. Your DOS manual
- contains many more.
-
- ██ DIR ██ (Internal command) lists a table of disk file
- contents. Use this command to view a disk volume label, all
- filenames, sizes of files in bytes, the date, time of file
- creation and amount of space left for storage on the disk. A
- disk for IBM PCs clones hold about 360,000 bytes or computer
- "words." DIR/W lists columns in "wide screen mode" DIR/P lists
- in "pause" mode (one screen at a time). You can also locate or
- find certain files. Example: a>dir letter.bak Example: c>dir
- rll.wks. You can switch and view another directory.
-
- Example: c>dir b:
-
- Example a>dir c:
-
- When you issue the DIR command your screen will produce a
- listing similar to this assuming you have a disk in the
- floppy drive:
-
- COMMAND COM 16037 2-15-84 3:55p
- ANSI SYS 1632 6-26-84 5:15p
- ASSIGN EXE 1386 5-22-84 3:42p
- AUTOEXEC BAT 40 3-26-87 6:32a
- BACKUP COM 11855 12-11-84 1:02p
- CHKDSK COM 6468 10-19-83 7:51p
- DEBUG COM 12223 10-19-83 7:52p
- DEVCNFG COM 4621 9-18-85 7:01p
- DISKCOMP COM 2088 9-12-85 4:41p
- DISKCOPY COM 1409 10-19-83 7:51p
- DISKSHIP EXE 2376 8-29-85 11:08a
-
- In the above partial screen listing, the first word in each line
- is the filename. The second word is the file extension.
- (Example: the first file is actually named COMMAND.COM not
- COMMAND COM ). The next number is the byte count or file size
- (i.e., how many computer words or bytes make up the file). The
- next item is the date of file creation. The final item is the
- time of file creation. This is very useful as you start to build
- up a collection of files! Which one is the latest and when did I
- write that financial report are common questions and good
- reasons why a date and time of file creation is important to
- both DOS and you.
-
- Tip: FILE HANDLING with the DIR command and DOS. On the screen a
- directory listing might show a file as PC-LEARN WKS But
- the true syntax to DOS is always PC-LEARN.WKS The point is
- that you need a dot between the filename (first part) and the
- extension of the file (second part) or DOS cannot handle the
- file properly.
-
- FILENAMES. There is a meaning to life, as they say. Filenames
- have meaning. The clue as to the use of a file usually resides
- in its three character file extension. Files can be typed in
- upper or lower case, DOS doesn't care! Names longer than eight
- letters will be shortened automatically to eight letters. File
- extensions longer than three letters will be shortened to three
- letters. The file name frequently gives a clue as to the nature
- of the file. The file extension or endname tells WHAT KIND of
- file it might be.
-
- Acceptable characters which can be used to make up a file name
- are: A-Z 0-9 $#&@!()-{}'`_~
-
- Unacceptable characters which CANNOT be used in a filename are:
- |<>\^+=?/[]";,* (and also) Control characters and the space
-
- Examples of filenames:
-
- 123.EXE The program 123, an "executable" file.
- Think of as a program that can be started
- and "run" to do something.
-
- GO.BAT A Batch file (bat). Like an exe file.
- Contains plain english DOS commands and can
- be viewed with the DOS "type" command.
-
- VIEW.COM Unknown file, but a "command" type,
- similar to an exe file.
-
- 783.WKS A worksheet file from lotus
- possibly from July of 1983 (7/83)
-
- README.TXT Probably a text file in plain
- english. Can be read and viewed with the
- DOS command: TYPE (discussed below.)
-
- XVC.DBF Unknown file, but we might guess a dBase
- database program database file.
-
- CONFIG.SYS A PC system file. Helps "configure" your
- computer for specific hookups, and equipment.
-
- If you type A>ZIGZAG (then press enter key) DOS will look for:
- ZIGZAG.COM or ZIGZAG.EXE or ZIGZAG.BAT. As we illustrated in the
- directory listing above, the first (ZIZAG.COM) is a COMMAND file
- or program which can be run to do something. The second is an
- executable file. And, the third is a batch file (see the batch
- file tutorial). Both .COM and .EXE files can execute as
- programs. The difference between the two relates to how memory
- is allocated. COM files when loaded into memory are exact mirror
- images of their structure on disk. EXE files are usually larger
- programs which use extensive chunks of RAM memory and are not
- exact images of their disk counterpart. An arcane but interesting
- distinction.
-
- A DOS command has a unique command syntax just like we humans
- have rules of grammar. A DOS command has a mandatory part and
- some DOS commands have an optional part.
-
- For example, DIR C:pathname\filename.ext/w/p is the complete
- syntax for the DOS DIR command we used above, BUT only DIR is
- mandatory. We will explain pathnames and directories in a later
- tutorial. For now just realize that DOS commands have a central
- or mandatory command and additional "refinements" or options
- with little / and \ bars to refine the command. / is a slash. \
- is called a backslash. You don't need to use the refinements,
- but they help as you grow in proficiency.
-
- FILE HANDLING LIES! DOS is quite honest for the most part. When
- you ask for a directory listing of files on a disk you usually
- get it. EXCEPT for two small lies! On the main DOS disk are two
- files which cannot be seen on the directory (hidden) but are
- there: IBMBIO.COM and IBMDOS.COM. These files are the core of
- the operating system. The designers of DOS hid them for two
- reasons 1) copyright concerns 2) protection from accidental
- erasure. But the biggest problem is that these two special files
- will not copy to disks in the normal manner (see our copy
- discussion below). These two files can only be copied with the
- SYS command or DISKCOPY command (also below). Without these two
- files a disk cannot boot or startup the computer. When you copy
- a DOS disk the COPY command copies almost everything (except
- IBMBIO and IBMDOS.) The DISKCOPY command copies everything. You
- only need IBMBIO.COM and IBMDOS.COM to start the computer.
- IBMBIO.COM and IBMDOS.COM do not have to be on every disk - only
- those disks which start the computer.
-
- Tip: STOP! Not a formal DOS command, but if you need to stop
- something in progress, (copying, listing) do this: If a
- directory is scrolling endlessly down the screen, hit control
- key AND the S key held together. This stops things until you
- want to continue (hit any key). To stop a DOS operation
- altogether, use control key and C key together. Easy way to
- remember: control-C means crash. control-S means stop. This will
- not always work within every program (e.g., inside lotus 1-2-3)
- but it does work within DOS.
-
- ██ TYPE ██ (internal) displays or "types" the contents of a
- file on your monitor. Use type for a glimpse into files. Only
- text files (also known as ASCII files) will read in english.
- Other files (com or exe) will show gibberish since they are in
- computer code. Hit CTRL-Z to stop (control and Z keys). Hit
- Ctrl-S (control and S key) to pause and any key to restart.
-
- Example: a>type readme.1st (sends output to screen)
-
- Example: b>type readme.1st>prn (sends output to printer)
-
- ██ ? and * ██ DOS can use "wildcards" in many operations (? *).
- Simply stated, these wildcards take the place of letters and
- numbers. Use the question mark as any SINGLE character. Use the
- * as any GROUP of ANY LENGTH of characters. Think of them as
- shortcuts to get the job done! Very powerful and useful!
- Frequently used with the COPY and DEL commands which are
- discussed in a few paragraphs.
-
- Example: c>dir a:*.wks
-
- Means provide a directory listing of any files on the a: drive
- ending in WKS and beginning with ANY characters of ANY length
- from 1 to eight digits. Files such as MY.WKS or NUMBERS.WKS or
- NAMES.WKS would fit this description.
-
- Example: b>copy ???.dat a:
-
- Means copy any files to a: drive ending in DAT and having any
- characters in the filename AND ONLY filenames exactly three
- digits long.
-
- The often used *.* means ANY FILE NAME and ANY extension
- regardless of length. For instance:
-
- Example: c>copy *.* a: (means copy ALL files from the existing
- default c: into the a: drive)
-
- Example: c>copy a:*.* b: (means copy ALL files from a: to b:)
-
- Example: a>del finance.* (delete files from the a: drive which
- begin with finance and have ANY file
- extension size or character type.)
-
- ██ COPY ██ (internal) copies one or several files to a disk or
- directory. Copy can duplicate a file onto another disk or into a
- subdirectory (more on subdirectories later). Copy is the most
- flexible and powerful of the DOS commands! Use the copy command
- with the wildcards seen above for even more flexibility.
-
- Example: b>copy zip.doc a: (copy zip.doc from b: drive to a:
- drive.)
-
- Example: a>copy c:why.me b: (copy why.com from c: drive to b:
- drive.)
-
- Example: c>copy c:fuss.txt b:whine.txt (copy fuss.txt from c:
- drive to b: drive and
- rename it whine.txt)
-
- Copy and /v verifies a good transfer or copy.
-
- Example: a>copy whine.bat b:/v
-
- Means copy the disk file whine.bat to the b: drive and then
- VERIFY this is a good copy. Verify is also an independent DOS
- command.
-
- Copy and the + symbol COMBINES two or more files into one larger
- file. Useful for combining two wordprocessor files into one
- larger file.
-
- Example: a> copy files.old+files.new files.all
- (The NEW file = files.all)
-
- Copy can send data to the printer.
-
- Example: b>copy files.new prn
-
- Example: b>copy files.new>prn.
-
- Copy CON (copy from the console or keyboard) can prepare batch
- files and autoexec.bat files to automate many DOS operations
- (examples below). In this fashion copy can create a new file and
- act like a very simple word processor!
-
- Example: a>copy con autoexec.bat (press enter)
-
- a>123 (press enter)
-
- a>^Z (press enter)
-
- In the last line ^Z is produced by either pressing F6 (function
- key 6) or holding down control key and z key together. This file
- means (first line) create a file named autoexec.bat as typed
- from the keyboard or con (console). (Second line) execute the
- program named 123. (Final line) end of my orders from the
- keyboard - prepare the file and stash it on the disk.
-
- ██ VERIFY ██ (internal) checks file copying operations to make
- sure a newly copied file is identical to its companion. It is
- usually added as a /V command at the end of a copy command, but
- also is a separate DOS command. Typing verify all by itself
- simply reports whether verify is currently on or off.
-
- Example: c>verify on (turns on verify function until you turn
- it off)
-
- Example b>verify off (turns off verify function until you turn
- it on)
-
- ██ DATE and TIME ██ (internal) A calendar and clock exist within
- DOS. On some computers it automatically is updated and kept
- current. On other computers (without a clock card or chip
- installed) you type in the date and time on startup. If you
- don't type in the date and time manually or have an automatic
- clock chip which does this, the default values will be 1/1/80
- and 00:00:00.00 for date and time respectively. You can enter
- the date with hyphens (-) or slashes (/). Do not enter the day
- of the week (e.g., Monday) even though it may show on the
- monitor. The PC will calculate this for you automatically. A two
- digit year references dates between 1980 and 1999. In 2000 you
- must use four digits. The time setting references a 24 hour
- military time clock (e.g., 1300 hours = 1PM). Date and time
- data is important to DOS since it is attached to all files to
- keep track of when they were created so you can determine which
- file is most recent.
-
- Example: b>time
-
- Example: a>date
-
- ██ DEL or ERASE ██ (internal) deletes files or groups of files.
- Use DEL*.* to erase all files from a disk. See our previous
- mention of wildcards (* and ?). If you make a mistake, certain
- non-DOS utilities (e.g., Nortons Utilities and PC-Tools) can un-
- delete a deleted file. But DOS cannot do this! Be careful - a
- typographic mistake can delete an unintended file! Deleting old
- files is a necessary operation, though, which frees up space on
- a disk. Hard disk users may prefer to move files to a floppy to
- free up space yet still retain a backup copy of the file in case
- of need.
-
- Example: a>del whine.txt
-
- Example: b>del 784.wks
-
- Example: a>del *.wks (notice the use of the * wildcard we
- mentioned earlier!)
-
- Example: a>del old.* (notice the use of the * wildcard we
- mentioned earlier!)
-
- Example: c>del ??.rxd (notice the use of the ? wildcard we
- mentioned earlier!)
-
- ██ DISKCOPY ██ (external) copies entire contents of one floppy
- to another. Some DOS versions (Ver 2.11) require you to first
- format the blank disk while later versions (Ver 3.1 and higher)
- sense an unformatted disk and first format it then proceed with
- the diskcopy. Diskcopy is a wise idea since disks wear out after
- several hundred hours of operation. The /1 argument means copy
- to side 0 of the disk only. All information on the target disk
- will be destroyed and over-written with the new information, so
- be careful!
-
- Example: a>diskcopy a: b: (copy the contents of a: floppy
- to b: floppy)
-
- Example: a>diskcopy a: b:/1 (copy the partial contents of a:
- floppy to b: floppy using single
- side of disk only)
-
- ██ COMP and DISKCOMP ██ (external) compare two files or disks.
- Diskcomp is frequently used after diskcopy operations. These
- commands ensure identical accuracy of the copied files or disks.
-
- Example: a>comp a:fuzz.txt b:thatch.txt (compares two files)
-
- Example: a>diskcomp a: b: (compares two entire
- disks)
-
- ██ CLS ██ (internal) clears the screen and puts the cursor in
- the home (upper left) position. Useful. Try it!
-
- Example: a>cls
-
- ██ FORMAT ██ (external) Prepares a blank floppy to receive data.
- Think of a fresh disk as blank paper. DOS prefers graph paper
- with little boxes drawn on it to receive data. Each little box
- stores a computer word or "byte." Format erases any old files on
- a disk (be careful!) Format prepares the tracks and sectors
- which will receive the data. All disks must first be formatted
- prior to use.
-
- Example: b>format a: (format floppy in a: drive)
-
- Example: c>format a:/s (format floppy in a: AND add system
- files)
-
- Example: a>format (format the disk in the DEFAULT a:
- drive).
-
- Full command syntax is: format d:/s/1/8/b/v
-
- In the above example, d: tells where the disk is. /s put the
- system files IBMDOS.COM and IBMBIO.COM on the disk. /1 formats
- one side of the disk only. /8 formats as 8 sectors for use the
- older DOS 1.1. /b formats as 8 sectors per track and leaves room
- for the DOS system files. /v puts a volume label onto the disk
- for future identification.
-
- Tip: Only new (empty) formatted disks can receive the system
- files (IBMBIO.COM and IBMDOS.COM). Once you put a few files on
- the floppy, the system files will not fit since track 0, sector
- 0 have been used. Remember that the system files are designed to
- start the computer and MUST start on track 0, sector 0, However
- very few of your floppies NEED the system files: just the one or
- two which actually start the PC.
-
- Tip: Danger! a>format c: wipes out your hard drive!
- Also c> del *.* wipes out hard drive.
-
- ██ REN or RENAME ██ (internal) changes name of a file to another
- new name. Destroys old name. Usually you will use this when you
- want to change on old backup file to another name so that it can
- be used by a program again. Wildcards are allowed but can cause
- trouble - be careful. If the new file name already exists, the
- ren command will give you an error message as a safety measure.
-
- Example: a>ren old.txt new.txt
-
- Tip: Use the copy command instead of rename if you want to KEEP
- the old file and its old name, and want another copy of that
- file with a new name. See the THIRD example given in the copy
- command.
-
- ██ VER ██ Shows the DOS version number.
-
- Example: a>ver
-
- ██ VOL ██ Displays a volume label, if one exists on a particular
- hard or floppy disk. The label is a name you can give the disk
- when it is first formatted. It can contain names, dates or
- helpful reminders much like the title on the cover of a book.
- Some special utilities help you change the volume label AFTER
- formatting has taken place.
-
- Example: c>vol
-
- ██ SYS ██ (external) copies the hidden files (BIO and SYS) to
- another disk which has been already formatted. This command
- makes a disk floppy bootable to the computer - you no longer
- need DOS to start the machine. The newly made disk with the two
- hidden files will boot (start) the machine by itself. The basic
- purpose of the SYS and format/s commands are to make a disk
- self-starting or self booting.
-
- The command FORMAT/S first formats a floppy then adds the hidden
- files.
-
- Example: a>sys b: (used when the disk is already formatted)
-
- Example: a>format b:/s (does same thing but first formats blank
- disk)
-
- Example: a>format b:/s/v (verify also used)
-
- ██ CHKDSK ██ (external) checks contents of a disk for errors.
- Chkdsk/f fixes minor file allocation table (FAT) errors.
- Chkdsk/v (v means verbose) displays all filenames as it works.
- Followed by a filename, chkdsk checks only that file. Always use
- the version of chkdsk which came with your DOS disk. Switching
- to a different version from another disk can do damage!
-
- Below is a sample display produced by running chkdsk on a floppy
- disk. The first three lines of the report tell about the disk.
- The last two tell about the RAM memory inside the computer.
-
- c>chkdsk b: produces following
-
- 362496 bytes total disk space
- 251904 bytes in 26 user files
- 110592 bytes available on disk
-
- 655360 bytes total memory
- 234016 bytes free
-
-
- Example: a>chkdsk b: (check b: floppy, all files)
-
- Example: c>chkdsk c:\*.* (check for contiguity of files
- in root of c: drive)
-
- Example: a>chkdsk b:this.doc/f/v (check only the file this.doc
- on b:floppy. Give verbose report
- and attempt to fix any errors)
-
- ██ FDISK ██ (external) prepares hard drive for data. First use
- fdisk then use format c:/s/v for second step. Some hard disks
- come shipped with fdisk already run and only need final
- formatting. Running fdisk is also known as partitioning the hard
- disk.
-
- Example: a>fdisk
-
- ██ LABEL ██ (external) attaches volume label or header to a
- floppy. Like stamping a book with a title. Only in DOS 3.0 and
- above. Some utilities can add this feature to DOS 2.11 and
- below.
-
- Example: a>label b:expenses.com
-
- ██ CTRL & PRTSC ██ (internal) aren't really DOS commands but a
- combination of two keystrokes at the same time which sends all
- displayed data to the printer until you hit the same two keys to
- turn the command off. This allows you to print directory
- listings or files of interest. Remember to turn command off when
- finished. Press CTRL-PRTSC to toggle the printer on and print
- anything which goes to the monitor screen, then press CTRL-PRTSC
- to toggle the printer off when you have all you need printed.
-
- ██ SHIFT & PRTSC ██ (internal) two key combination which copies
- only the current screen to your printer.
-
- DOS also uses device (equipment) names within commands. For
- example you can talk to your printer on keyboard by using the
- proper DOS name. Each name is unique.
-
- ██ CON ██ Is the name for the keyboard and monitor. Below is a
- repeat of a previous example using the con device name.
-
- Copy CON ("copy from the console or keyboard) can prepare batch
- files and autoexec.bat files to automate many DOS operations
- (examples below). In this fashion copy can create a new file and
- act like a very simple word processor!
-
- Example: a>copy con autoexec.bat (press enter)
-
- a>123 (press enter)
-
- a>^Z (press enter)
-
- ██ AUX: or COM1 ██ Is the first ansynchronous communication port
- which usually has a modem, serial printer or mouse connected to
- it. COM2 is the second port. PC's can have up to 4 serial ports.
-
- ██ PRN or LPT1 ██ Is the first parallel port which is usually
- used with a printer. LPT2 is the second printer. By the way, a
- PORT is an electrial socket on the back of the PC where a cable
- of some type plugs in.
-
- ██ CAS1 ██ Is an antique term still available within DOS which
- refers to the early PC days when a cassette recorder was used
- for storing data rather than floppies. This is the cassette
- recorder port.
-
- ██ NUL ██ Is a test device. Anything sent to nul goes nowhere.
- However it is useful in testing DOS batch programs or simply
- sending excess garbage from a screen report to nul (nowhere)
- thus uncluttering a busy screen. Odd but useful in its own
- right!
-
- ████████████████████████████████████████████████████████████████
-
- SUBDIRECTORIES - LITTLE BOXES IN THE DISK DRIVE
-
- ████████████████████████████████████████████████████████████████
-
- Floppy disks have a relatively limited capacity to store files -
- limited in comparison to the seemingly expansive space on a hard
- drive. To find a necessary file name on a floppy, just use the
- DIR or directory command. However, on a hard disk things get a
- little out of hand with hundreds of files all listed on the same
- screen. In version 2.0 of DOS and above, a solution is obtained
- by adding subdirectories and pathnames to manage the location
- and organization of file storage. A path is nothing more than a
- "trail" or "direction post" which helps DOS find a particular
- file out of the hundreds which may be located on a hard drive.
-
- This pathname is facilitated by the use of multiple directories
- (called subdirectories) on a single disk. In this fashion you
- sort files into groups in a specific place on the drive. By the
- way, a subdirectory is itself a small file and does occupy space
- on the disk.
-
- You could compare a hard or floppy disk to a department store.
- The store might sell toys, books and clothes. Similar items go
- in the same department or area.
-
- A disk also has the capacity for many separate areas in which to
- place files. DOS refers to these with a main central directory
- (root directory) and subdirectories branching below it. You can
- create a subdirectory named TEXT which contains all your word
- processing documents. Computer utilities could be in a
- subdirectory called UTIL, and so on.
-
- In diagramatic form this might be seen in a simple example as:
-
-
- ROOT (CENTRAL) DIRECTORY (contains startup files)
- |
- |
- ----------------------------------------------------------
- | | |
- | | |
- DATABASE SUBDIRECTORY SPREADSHEET SUBDIRECTORY GAMES SUBDIRECTORY
- | | | |
- | | | |
- data files business files PERSONAL games files
- |
- |
- ----------
- | |
- | |
- Earnings files Tax files
-
- On the screen, a listing of any subdirectory might show the
- first two entries mysteriously named . and .. (single dot and
- double dot).
-
- The first dot is a name for the subdirectory itself. The double
- dot is a name for the parent (higher) directory one level up.
- Anytime that a subdirectory can be referred to, one can use . or
- .. For example, if you want to copy all of a diskette, you
- could use copy A:. (A: single dot) instead of copy A:*.* or
- A:\*.*
-
- Be careful to use short pathnames, especially in the DOS search
- PATH. A long path name (example: \this\that\another\yik\yak)
- slows down DOS searches and is a pain to type out. When DOS
- first starts or boots up, you always begin in the root
- directory. Notice that pathnames use the backslash (\) as their
- main "roadpost."
-
- The correct name of a file always includes its path. Thus
- while we might talk about a file named PCL.EXE its REAL NAME
- if it were in a subdirectory area of a hard disk might be
- \this\that\thing\place\PCL.EXE. Most hard drive users include
- a PATH command within their autoexec.bat file to allow DOS to
- find the location of all the files. In this way you DON'T have
- to change directories manually - unless you want to - for the
- file to execute. DOS will simply consult the PATH established
- when the computer started and read in the autoexec.bat to find
- all files regardless of subdirectory location.
-
- The DOS commands MD, RD, and CD allow you to make, remove, and
- change among subdirectories. They are of marginal use on a
- floppy but essential use on a hard drive which may have hundreds
- of (hard to locate) files.
-
- Frequently the main (root) directory is where startup files are
- stored. The mark of a good main or root directory is that a DIR
- listing of the root should fill only ONE screen and not scroll
- down with many screens extraneous files.
-
- ██ MD or MKDIR ██ (internal) makes a subdirectory and assigns it
- a name or
-
- Example: a>md\data
-
- Example: c>md c:\data\files
-
- ██ RD or RMDIR ██ (internal) removes an empty subdirectory (it
- cannot remove a subdirectory already loaded with files as a
- safety measure - use the DEL command to first clear a
- subdirectory.) The root (main) directory cannot be removed.
-
- Example: b>rd\letters\financial (removes financial subdirectory
- below letters subdirectory and
- root directory)
-
- ██ CD or CHDIR ██ (internal) changes the current (active)
- subdirectory or directory. CD\ brings you to the root (main
- directory) no matter where you are.
-
- Example: a>cd\ (change to the root or uppermost
- directory)
-
- Example: c>cd\data (change to subdirectory named data
- below the root)
-
- Example: b>cd\data\financial
-
- ████████████████████████████████████████████████████████████████
-
- TURNING ON THE PC - THE ELEGANT BALLET OF DOS TECHNOLOGY
-
- ████████████████████████████████████████████████████████████████
-
- The following description is an optional tutorial but may
- be interesting for those curious about the starting sequence
- when a computer is first turned on and what the role of DOS is
- in this rather "elegant electronic ballet."
-
- The command processor mentioned earlier (i.e., COMMAND.COM) is
- also a file which resides on the disk but once it is read into
- the RAM chip memory of the computer it stays or resides there
- until the machine is turned off. Sometimes you may even need to
- load a second copy of COMMAND.COM and at other times, some
- application programs and games provide their own command
- processor. Basically COMMAND.COM watches for keystrokes from
- your keyboard and tries to execute commands and actions based on
- what it finds. That is why it is called a COMMAND PROCESSOR.
-
- The input/output system consists of two system files (which live
- on the DOS disk) plus a ROM (read only memory) chip which also
- contains software instructions wired directly into the circuits
- of your computer. The two system files which are on the DOS disk
- are normally hidden and not available for changing. The most
- elemental and necessary part of the input/output system is
- called the BIOS or basic input/output system. The BIOS consists
- of the ROM chip on the computer's main circuit board we
- mentioned earlier plus one of the hidden files on the DOS disk
- called IBMBIO.COM (or IO.SYS). The other hidden file on the DOS
- disk, IBMDOS.COM (or MSDOS.SYS), is the main file handling
- system for the computer. IBMDOS.COM hides inside it a portion
- of software for disk based files and a portion for non-disk
- peripherals. The two files (IBMDOS.COM and IBMBIO.COM) are
- necessary because non-disk peripherals require data as strings
- of characters (one after another in a long line) while disks
- move their files about in large data groups known as blocks.
-
- Let's jump back to COMMAND.COM which provides three services for
- the computer: it handles critical errors and problems. If your
- printer is not turned on at the right time or a disk drive door
- is open, COMMAND.COM finds out and attempts to report a message
- or suggest a remedy. It also handles critical interrupts which
- is a technical way of saying it takes care of demands and
- priorities imposed by the differing parts of the hardware. If
- you hit the Ctrl-Break key combination to stop a DOS operation,
- this is a critical interrupt which COMMAND.COM must deal with.
- Finally it performs end of program services which are routine
- chores like making more RAM memory available when a program
- finishes its job or reloading parts of itself when needed. In
- addition it also places the familiar prompt C> or A> on the
- screen and listens for commands you might type. Essentially,
- COMMAND.COM instructs the rest of the DOS series of programs
- what to do.
-
- When you first turn on the switch to start the computer in the
- morning, the machine goes through a process called "booting."
- This derives from the arcane but descriptive process which
- refers to how the machine literally picks itself up by the
- "bootstraps." In the first stage of "booting up," the machine
- begins by testing its memory RAM chips and other components in a
- power on self test (POST). After this, the left or top A: floppy
- drive spins and if no disk is available the hard drive light
- flickers as the machine searches for further clues about
- starting itself. Initially the ROM chip BIOS wired inside the
- machine loads track 0, sector 0 of the disk.
-
- This disk sector contains a very small program (boot loader)
- which reads the rest of the input/output system stored on the
- disk. Next the boot loader reads the input/output system
- (IBMBIO.COM and IBMDOS.COM) into the system. IBMBIO.COM
- initializes the hardware of the machine and runs a small file
- named CONFIG.SYS (if available) and finally moves IBMDOS.COM
- into its normal location in RAM memory. Finally, IBMDOS.COM
- loads COMMAND.COM and turns control over to it. COMMAND.COM runs
- the AUTOEXEC.BAT startup file (if found) and finally control is
- given to the keyboard and you. It is a long process with each
- step depending on the previous! An elegant ballet, fascinatingly
- complex, but necessary for the PC to function.
-
- Why not wire this permanently into the machine on a ROM (read
- only memory) chip? Some machines do, but the main advantage of
- having this information stored on a disk is that it can be
- updated and revised easily via a change of a floppy disk. The
- machine can revise its operating system quickly by simply using
- a different or later version of DOS (or even an operating system
- other than DOS such as UNIX or other operating systems.) This is
- what gives the PC such flexibility to change and upgrade to a
- newer operating system without the expense of tearing down or
- even replacing the machine. You simply change the floppy disk
- and you have a new way of doing business! Simplicity, elegance
- and ease of changing software is what this means for the
- computer user.
-
-
-