Disk Operating System DOS, If You Must

Disk Operating System DOS, If You Must

By the End of This Tutorial. You’ll Be Able To:
 Pronounce DOS correctly (hint: rhymes with “sauce”)
 Enter five harmless DOS commands
 Run a DOS program
 Figure out what’s on a diskTo place an order for the Complete Project Material, pay N5,000 to
GTBank (Guaranty Trust Bank)
Account Name – Chudi-Oji Chukwuka
Account No – 0044157183
Then text the name of the Project topic, email address and your names to 08060565721.  

It’s time for DOS to wander off onto an ice floe somewhere and die a peaceful death. DOS (pronounced “dawss”) has simply outlived its usefulness. Its commands are cryptic, its prompt is clueless, and its error messages are downright rude. We want menus. We want tiny pictures of things. We want Microsoft Windows.
However…as long as there are DOS programs, and as long computer stores sell old games “toe run only under DOS, you’re going to need to know a little bit about DOS. In this tutorial, you’ll learn the least you need to know to survive the DOS prompt.

What Exactly Does DOS Do, anyway?
DOS is the boss, the supervisor, of your computer. As boss, DOS performs the following duties:
 Traffic cop DOS tells your computer how to interpret input (from the keyboard and mouse), how to process data, and how to produce output (on the monitor or printer).
 Program launcher You can run your other programs from the DOS prompt. DOS retreats to the background (where it belongs), silently managing any communications between the other program and your computer.
 Jack-of-all-trades DOS gives you the tools to manage your disks and files: to prepare disks to store information, to copy files to a disk, to move or rename files, and to delete files.

Facing the DOS Prompt
When you boot your computer, you may see the DOS prompt (as shown in the following figure), displaying the letter of the active drive and hinting that you can enter a command. It doesn’t tell you much else. To enter a command, you type the command and press the Enter key. But what do you type and how do you type it? You’ll learn all that later in this tutorial.
If you don’t get the ugly DOS prompt when you start your computer, your computer may be set up to automatically run Windows or some other program. In such a case, you can probably avoid DOS, and skip the rest of this tutorial. However, if you want to do all the fun stuff in this tutorial, you can exit the program you’re in, or skip ahead to the next section, “Doing DOS from Windows.”

Doing DOS from Windows
Windows hasn’t completely abandoned DOS (although Windows 95 tries real hard). Both windows 3.1 and Windows 95 provide a way to go out to the DOS prompt. In Windows 95 click the Start button, point to Programs, and then click MS-DOS Prompt. In Windows 3.1, open the Main program group window, and double-click the MS-DOS Prompt icon. Regardless of which version of Windows or DOS you’re using, the DOS commands explained in this tutorial all work the same way.
Sometimes, Windows displays the DOS prompt inside a window, sort of pretending that I OS is a Windows program. Other times, Windows runs DOS in full-screen mode, giving you a black screen with the diminutive, off-white DOS prompt. To switch from window-size DOS to full-screen DOS (or vice versa), press Alt+Enter. Because Windows uses memory to create a window, DOS will use less memory when run in full-screen mode.

DOS Games fire Temperamental
If you’re going to DOS to run a computer game in Windows 3.1, you may need to completely exit Windows. Most DOS games require a lot of memory, and if Windows is consuming part of that memory, there may not be enough left for the game. However, Windows 95 does a fairly good job of managing memory so there is enough for the game.

Harmless DOS Commands, Just for Practice
Before you get into the heavy, important DOS commands where mistakes do count, try a :e-v light commands that can’t hurt anything. (Oh yeah, if any of the DOS commands in this section don’t work, try typing cddos and pressing Enter. Then enter the command).

Internal and External Commands
A DOS command is an order that you tell DOS to carry out. There are • types of DOS commands: internal and external. Internal commands, such as DIR, are stored in memory for quick access. External commands, such as FORMAT, are small programs that are stored on disk. When you enter an external command, DOS runs the program required to perform the task.

What’s Today’s Date?
Unless you picked up your computer at a garage sale or an auction (circa 1984), it has an internal, battery-powered clock that keeps track of the date and time. To tell DOS to display the date on-screen, do this:
1. Type date and press Enter. DOS displays something like the following: Current date is Tue 06-01-96 Enter new date:
2. If the date is correct, press Enter. If the date is incorrect, type the correct date in form mm-dd-yy (for example, 07-04-96) and press Enter.
Capitalization Doesn’t Natter
Don’t worry about capitalization: date, DATE, and dAte are all the same to DOS. However, if you leave out a space, add too many spaces, or use punctuation marks that I don’t tell you to use, DOS won’t recognize the command. For example, if you typed date, and pressed Enter, DOS would display the message Invalid date.

What Version of DOS Do You Have?
Every time Microsoft Corporation releases an updated version of DOS, the version number increases, and the program can do more new things or can do old things better. Hence, DOS 6.2 is better than DOS 4.01. To find out which version of DOS you have, type ver and press Enter (VER stands for “version”). DOS displays the version number on-screen.

Sweeping Up the Screen
Now that you have the date and DOS version number displayed on-screen, your screen looks like an alphabetical junkyard. To clear the screen, type els and press Enter. (CLS stands for Clear Screen.)

Giving DOS a Makeover
The DOS prompt shows only the letter of the active disk drive (for example, A:>, B:>, or C:>). You can change the look of the DOS prompt by using the PROMPT command. Type one of these funky prompt commands:
 Type prompt $n$q and press Enter. $n tells DOS to display the current drive, and $q tells it to display the equal sign (=). The prompt now looks like C=.
 Type prompt $v $n$b and press Enter. $v tells DOS to display the DOS version number, and $b tells it to display a vertical line called the pipe symbol (|). The prompt now looks like MS-DOS Version 5.0 C| (why you would want a prompt like this is beyond me).
When you are done fooling around, type prompt $p$g and press Enter. $p tells DOS to display the names of all the directories leading up to the current directory (along with the current directory’s name), and $g tells DOS to display the right angle bracket (>). The remaining commands in this post assume that you can see the drive and directory names at the DOS prompt.

Dissecting a DOS Command
A typical DOS command, copy c:datajohnson.Itr b: /v consists of the following elements:
Command This is the name of the DOS command (in this case, COPY). It tells DOS which action you want DOS to carry out.
Delimiters Spaces and special characters (such as /, , and 🙂 that break down the command line for DOS. Think of delimiters as the spaces between words in a sentence.
Parameters Specify the objects on which you want DOS to perform the action. In the preceding example, c:datajohnson.ltr is the parameter.
Switches Allow you to control how the command performs its action. In this case, the /V switch tells DOS to verify the copy operation to make sure the copy matches the original.

What Kind of Computer Do You Have?
If you have DOS version 6.0 or later, you have a program called Microsoft Diagnostics that can display more information about your computer than you probably want to know. To run the diagnostic program, do this:
1. Type msd and press Enter. The Microsoft Diagnostics screen appears, as shown in the following figure.
2. To exit the diagnostic program, press F3, or press Alt+F and then X.
Use MSD to Shop
Next time you’re at your local neighborhood computer store, try run¬ning Microsoft Diagnostics from some of the computers on display. You’ll probably end up knowing more than the salespeople about the computers they’re selling.

Gimme Help
DOS versions 5.0 and later include a help system (clever idea, eh?) that you can access by typing help and pressing Enter. A list of all the available DOS commands appears, as shown here. Press the Page Down key to see more of the list. Press the Tab key to move from one command to another. Press Enter to view help for the currently selected command.

Where Have fill the Files Gone?
If you’re going to make it in DOS, you have to master its filing system. This system can be summed up in three words: disks, directories, and files. Each disk is capable of storing gobs of files, too many to keep track of in any single location. So, DOS uses directories to group the files. To figure out where DOS is hiding all your files, you have to know how to change from one drive to another, switch to a directory, and display file lists. You’ll learn all this in the following sections.

Changing to a Disk Drive: The Old Shell Game
To change to a disk drive, type the letter of the drive followed by a colon (:) and press Enter. For example, if you have a disk in drive A, type a: and press Enter. The DOS prompt then changes to A:>. To change back to drive C, type c: and press Enter.
Unformatted Disk Need Not Apply
Before you change to a disk drive, make sure the drive contains a formatted disk (your hard disk, CDs, and the program disks you pur¬chase are already formatted). If you change to a drive that does not contain a formatted disk, the following error message will appear:
Not ready reading drive A Abort, Retry, Fail?
Insert a formatted disk in the drive, close the drive door, and press R for Retry.

Changing to a Directory
When DOS activates a disk drive, DOS automatically looks for files in the first directory on the disk: the root directory. If the files are in a different directory, you must change to that directory by entering the CHDIR or CD (Change Directory) command. You’ll practice changing directories in the next few sections.

Going to the House of DOS: The DOS Directory
Depending on how your computer is set up, you may have to change to the DOS directory to enter a DOS command. Here’s how you do it:
1. Type c: and press Enter to change to drive C. C:> appears on-screen.
2. Type cd dos and press Enter (CD stands for Change Directory). C:DOS> appears on-screen. You are now in the house of DOS.

Going Back to the Root Cellar
To change back to the root directory, type cd and press Enter. The DOS prompt changes back to C:>.
Don’t Mess with the Root Directory
The root directory contains a lot of important files, so don’t play around too much in this directory. Move the wrong file, and you may not be able to start your computer.
Changing to a Subdirectory
Let’s say you want to work with the files in a subdirectory (a directory that’s under another directory). For example, suppose you want to work with the files in C:DATABOOKS (assuming you have this directory on your hard disk). You can change to the subdirectory in either of two ways. The first way is to enter two CD commands:
1. Type c: and press Enter to change to drive C.
2. Type cd data and press Enter to change to C:DATA. (The backslash tells DOS to start at the root directory.)
3. Type cd books and press Enter to change to C:DATABOOKS. (Note that the backslash is omitted here, because you don’t want to start back at the root directory.)
The other way to change to a subdirectory is to use a single CD command followed by a complete list of directories that lead to the subdirectory. This list of directories is also known as a path. Here’s what you do:
1. Type c: and press Enter to change to drive C.
2. Type cd databooks and press Enter.
In addition to moving down the directory tree, you can move up the tree. Type cd .. and press Enter to move up one directory in the tree.

So What’s in This Directory?
Once you have changed to the drive and directory that contains the files you want to work with, you can view a list of the files on that drive and directory. To view a list of files, type dir and press Enter. A file list appears.
Whoa! Slowing Down the File List
If the file list contains too many files to fit on one screen, the list scrolls off the top of the screen, making you feel as though you are falling very fast. To prevent the list from scrolling off the screen, you have three options:
 Type dir /w and press Enter. The /W (wide) switch tells DOS to display only the names of the files and to display the file names in several columns across the screen.
 Type dir /p and press Enter. (The /P stands for Pause.) DOS displays only one screenful of file names at a time. You can press any key to see the next screenful of names.
 Type dir /a:d and press Enter. (The /A:D stands for Attribute:Directories.) DOS displays the names of the directories under the current directory. No file names are displayed.
Narrowing the pile List
You may not want to view all the files in a directory. You may, for example, want to view only those files that end in .EXE, .BAT, or .COM (these are files that run programs). To view a group of files, you can use wild-card characters.

Dealing with Wild Cards
A wild-card character is any character that takes the place of another character or a group of characters. Think of a wild-card character as a wild card in a game of poker. If the Joker is wild, you can use it in place of any card in the entire deck of cards. In DOS, you can use two wild characters: a question mark (?) and an asterisk (*). The question mark stands in for any single character. The asterisk stands in for any group of characters.
Here are some ways you can use wild-card entries with the DIR command:
Type dir *.com and press Enter to view a list of all files with the .COM file name extension (for example, HELP.COM, EDIT.COM, and TREE.COM).
Type dir ???.* and press Enter to view a list of all files that have a file name of three letters or fewer (for example, EGA.CPI, SYS.COM, and FC.EXE).
Type dir s???.* and press Enter to view a list of all files whose file name starts with S and has four letters or fewer (for example, SORT.EXE and SYS.COM).

Wild Cards and Switches
You can use a wild-card entry with a switch. For example, if you type dir *.com /w, DOS will display only those files with the .COM extension and will display them in several columns across the screen.

Ditching DOS: Running Another Program
The easiest way to deal with DOS is to avoid it; run one of your programs and have DOS retreat backstage where it belongs. To run a DOS program, you change to the directory where the program’s files are stored and then enter the command for running the pro¬gram. For example, you may enter wp to run WordPerfect.

The Least You Need To Know
Until Bill Gates descends from the mountain and announces that “DOS is dead,” you’ll need to know the basics of working at the DOS prompt:
 The DOS prompt shows the letter of the current drive and the name of the directory.
 To change to drive A, shove a formatted disk into drive A; type a: and press Enter.
 To change to a directory, type cd dirname (where dirname is the name of the directory) and press Enter.
 To view a list of files in a directory, type dir and press Enter. Type dir /w if the list flies past the screen.
 To run a program from the DOS prompt, change to the drive and directory that contains the program’s files, type the command to run the program, and then press Enter.

Doing Something Useful with Programs
You didn’t buy a computer so you could watch the pretty pictures or drag icons across the screen. You got a computer so you could do some work.. .or play a few games. This section provides a tour of the various applications you can run on your computer— programs for creating letters, balancing your checkbook, drawing pictures, managing your schedule, learning something, and even having some fun.
And that’s not all. You’ll also learn what to do when you bring a new application home—how to install it on your hard drive (or play a CD), enter commands, and use the application without flipping through the documentation.

To place an order for the Complete Project Material, pay N5,000 to
GTBank (Guaranty Trust Bank)
Account Name – Chudi-Oji Chukwuka
Account No – 0044157183
Then text the name of the Project topic, email address and your names to 08060565721.  

Speak Your Mind