Get into DOS

If you have an IBM-compatible computer, it understands MS-DOS commands — even if your computer comes with Windows. This chapter explains how to give MS-DOS commands.

MS-DOS commands are worth learning because they give you total control over your computer. They solve the difficulties caused when Windows acts strangely or conks out — which happens often!

MS-DOS commands are trustworthy: when you give an MS-DOS command, you know exactly what will happen. When you give a Windows command, you can’t be sure of the consequences: Windows is flaky and full of unfortunate surprises. Technicians repairing computers rely on MS-DOS. Also, MS-DOS runs well and fast even on old, decrepit, or broken computers, whereas Windows usually runs slowly or erratically or not-at-all.

Versions

MS-DOS comes in many versions. Versions for the IBM PC are called PC-DOS. Versions for clones built by Compaq are called Compaq DOS.

Get the MS-DOS version intended for your computer. Get it from the dealer who sold you the computer. If you use the wrong version of DOS — for example, if you try using PC-DOS on a Compaq computer, or using Compaq DOS on a different brand of clone — the computer might gripe (especially when you try programming in BASIC) or give you the wrong time or do something else weird.

Here’s how Microsoft and IBM gradually improved PC-DOS (which is the IBM PC version of MS-DOS).

The original version of PC-DOS was called version 1. Then came an improvement called version 1.1. Then came versions 2, 2.1, 3, 3.1, 3.2, and 3.3.

Version 1 handled just the original IBM PC and its 5¼-inch floppy disks. That version wrote on just one side of each disk and put 8 sectors on each track, so that each disk held 160K. Version 1.1 could write on both sides of each disk, so that each disk held 320K.

Version 2 could also handle the IBM PC XT and its 10-megabyte hard disk. That version also squeezed more data onto each floppy disk: onto each track, it put 9 sectors instead of 8, so the floppy disk held 360K instead of 320K. Version 2.1 could also handle the IBM PC Junior.

Version 3 could also handle the IBM PC AT, its 20-megabyte and 30-megabyte hard disks, and its high-density 5¼-inch floppy disks (which held 1.2 megabytes instead of 360K). Version 3.1 could also handle networks. Version 3.2 could also handle the IBM PC Convertible and its 3½-inch 720K floppies. Version 3.3 could also handle the IBM PS/2 and its 3½-inch 1.44 megabyte floppies.

Other early versions of MS-DOS (such as Compaq DOS) were numbered similarly to PC-DOS. For example, Compaq DOS version 3.31 resembled PC-DOS version 3.3 but let you more easily handle hard disks bigger than 30 megabytes.

In July 1988, Microsoft and IBM began selling version 4. Like Compaq DOS version 3.31, it let you handle huge hard disks easily. But alas, version 4 consumed too much RAM and was incompatible with some older programs.

In June 1991, Microsoft and IBM began selling version 5, which fixed DOS 4’s problems and included many exciting new commands. In 1993 they began selling version 6, which was even fancier.

Afterwards, Microsoft and IBM parted company and competed against each other. IBM invented and sold version 6.1, without involvement from Microsoft. Then Microsoft fought back by inventing and selling version 6.2. Then IBM retaliated with version 6.3 and version 7.

Then Microsoft invented Windows 95, which includes a DOS version I’ll call DOS 95. (Microsoft sometimes calls it "DOS 7", but I’ll say "DOS 95" to avoid confusion with IBM’s DOS 7.)

Headaches Some DOS versions give you headaches.

Versions 1.0 and 1.1 can’t handle hard disks at all.

Versions 2.0 and 2.1 have difficulty handling hard disks bigger than 16 megabytes. Here’s why. When you first use a hard disk, DOS is supposed to search for bad sectors on the hard disk, draw a map of where those bad sectors are, and remember to avoid those bad sectors. Versions 2.0 and 2.1 search for bad sectors throughout the first 16 megabytes but don’t bother to map the bad sectors on the rest of a big hard disk. Those versions of DOS seems fine at first; but when you finally fill more than 16 megabytes of your disk, the computer eventually encounters bad sectors it didn’t map, gets upset, and refuses to run your programs.

Versions 3.0 and 3.2 make lots of errors. Avoid them.

Versions before 3.2 can’t handle 3½-inch floppies. Version 3.2 handles 3½-inch floppies, but just if they’re double-density instead of high-density.

Version 4 consumes too much RAM.

Versions 6.1, 6.3, and 7 are weird, since they’re the only versions that Microsoft didn’t help design. They’re the only versions that don’t accept standard Microsoft commands.

Versions 3.3, 5, 6.2, and 95 work fine. That’s why they’re the most popular versions! Version 6.0 works acceptably just if you avoid using its three fanciest routines (Double Space, Smart Drive, and Mem Maker), which are disastrously unreliable. Version 6.2 includes improved versions of those routines. Version 95 is version 6.2 modified to be compatible with Windows 95.

A company called Stac Electronics sued Microsoft for putting Stac’s ideas into Double Space. In 1994, Stac won the suit. The judge ordered Microsoft to pay Stac and stop selling versions 6.0 and 6.2, so Microsoft came out with version 6.21 (which omits Double Space) and version 6.22 (which includes a Double Space clone called Drive Space). When Stac complained that Microsoft wasn’t removing all remaining copies of versions 6 and 6.2 from shelves quickly enough, Microsoft squashed the problem by paying Stac even more and buying 15% of the Stac company itself. So now Microsoft is a Stac shareholder, and the two companies are buddies.

DR DOS Instead of buying MS-DOS, you can buy an imitation called DR DOS (or Novell DOS). It’s made by a company called Digital Research (DR), which is now owned by Novell. Though DR DOS resembles MS-DOS, I prefer MS-DOS because it includes BASIC and is more compatible with Windows and other software.

Which version I’ll emphasize I’ll emphasize how to use DOS 6.2. My explanation of DOS 6.2 applies to all its variants (DOS 6.20, 6.21, and 6.22).

I’ll also explain how other DOS versions differ from 6.2.

To keep this chapter mercifully short, I’ll assume your computer is normal. For example, I’ll assume you’re using a reasonably new version of DOS (version 2 or higher), you’re not using IBM’s weird versions (6.1 and 6.3), and you’re not using DR-DOS or Novell DOS.

I’ll assume your computer has a hard drive. (If your computer does not have a hard drive, read the 15th edition. To get that edition, phone me at 617-666-2666.)

Modern versus classic DOS versions 5, 6, 6.2, and 95 are similar to each other. I’ll refer to them as modern DOS. Earlier DOS versions (2, 2.1, 2.2, 3, 3.1, 3.2, 3.3, and 4) are called classic DOS.

Notice that in the computer industry, the word "classic" is a euphemism that means "old, obsolete, and decrepit". Go ahead: follow that tradition! Next time you meet a person who’s old, obsolete, and decrepit, say "You’re a classic!"

Cost

The best way to get DOS is from the dealer who sold you the computer. Most dealers include DOS in the computer’s price, but other dealers charge for DOS separately.

DOS 95 DOS 95 is part of Windows 95. The only way to get DOS 95 is to get Windows 95. Most computers come with Windows 95 (and hence DOS 95).

Piracy If you buy two computers, you must buy two copies of DOS (or of Windows 95). It’s illegal to buy just one DOS and copy it to the other computer. That’s called illegal copying; it’s piracy.

Some dealers illegally copy DOS onto the computer’s hard disk without paying Microsoft or IBM. Recently, Microsoft has been requiring every dealer who copies DOS onto a hard disk to give the customer an official Microsoft certificate of authenticity with a hologram sticker on it. The certificate comes from Microsoft and proves the DOS was paid for. The hologram sticker shows you a 3-dimensional picture of the DOS version number (such as "6.2") or a baby.

Usually, the certificate comes with an official Microsoft manual (not just a book from a bookstore!) and an official set of DOS floppy disks (on which are pasted official Microsoft labels that are printed, not handwritten!). But the manual and floppies are optional, and some dealers are too cheap to provide them. Windows 95 often comes on a CD-ROM disk instead of floppy disks.

If you get neither a manual nor floppies nor a CD-ROM, your dealer (or the dealer’s supplier) is a crook or an ass.

How to upgrade If you own an old version of DOS, you can switch to MS-DOS 6.22 by getting the MS-DOS 6.22 upgrade for about $50. Switching is simple if you have a high-density 3½-inch floppy drive and already own a version numbered above 2.1.

If you already have Windows 95, you have DOS 95. Since it’s better than DOS 6.22, do not switch to DOS 6.22!

If you own MS-DOS 6.0, you can switch to MS-DOS 6.22 for under $10 by getting the MS-DOS 6.22 Step Up disk (which is 3½-inch high-density). That disk works just if you already own MS-DOS 6.0 (or 6.20 or 6.21). It does not work if you own an older DOS and does not work if you own DOS 6.1, 6.3, or 7 (which are the weird versions by IBM). Since it costs little and it improves DOS just slightly, it does not come with a certificate, hologram, or manual.

List of commands & equations

To use DOS, you put your fingers on the keyboard and type a DOS command or equation. The popular DOS commands & equations are explained on these pages:

Command What the computer will do Page

a: make drive A be the current drive 121

attrib +r mary make MARY be a read-only file 144

b: make drive B be the current drive 121

backup c:mary a: copy MARY to a set of floppies in drive A 147

c: make drive C be the current drive 121

cd sarah make SARAH be the current directory 121

chkdsk check the disk for bytes and errors 122

cls clear the screen, so it becomes blank 117

copy con mary copy from keyboard to a file called MARY 126

date show the date, and let it be changed 117

defrag rearrange files so they’re not fragmented 141

del mary delete a file called MARY from the disk 128

deltree sarah delete the SARAH folder & everything in it 128

dir show a directory of all files 118

dir sarah show a directory of all the files in SARAH 120

dir sarah /s show the SARAH directory & subdirectories 143

diskcopy a: b: make disk B be an exact copy of disk A 125

do music do the MUSIC program in MUSIC folder 149

echo off stop displaying DOS commands 130

echo wow show the word "wow" on the screen 117

edit mary edit file called MARY, using modern editor 128

edlin mary edit file called MARY, using an old editor 129

fdisk partition the hard disk into C, D, E, etc. 138

format a: format the disk in drive A 124

format a: /s format disk in drive A & make it bootable 138

help list all the DOS commands & explain them 144

intersvr be the server in an Interlnk network 225

Lh doskey load the doskey driver into upper memory 136

Lh mode LPT1 retry=b wait for printer to respond, even if long wait 136

Lh mouse load the mouse driver into upper memory 136

Lh mscdex /d:mscd000 load CD-ROM driver into upper memory 136

md sarah make a new directory, called SARAH 126

mem show how big the RAM memory is 140

more<mary show a file called MARY, a page at a time 144

move mary a: move MARY to drive A, and delete from C 128

msav run the MicroSoft Anti-Virus program 142

msbackup copy from the hard disk to a set of floppies 146

msd make MicroSoftDiagnostics analyze computer 140

path c:\dos whenever a program not found, search c:\dos 135

print mary copy a file called MARY onto paper 143

prompt $p$g make prompt be "C:\>" instead of "C>" 135

rd sarah remove directory SARAH from the disk 128

rem written by Joey ignore this remark & skip ahead to next line 144

ren mary lambchop rename MARY; change to LAMBCHOP 128

restore a: c: /s copy all backed-up files to the hard disk 147

scandisk scan the disk for errors and fix them 141

set temp=c:\temp define "temp" to mean "c:\temp" 135

share /L:500 /f:5100 check if programs interfere with each other 137

subst a: b:\ when told to use drive A, will use B instead 148

sys a: copy the DOS system files to drive A 138

time show the time, and let it be changed 117

type mary show, on the screen, what’s in the MARY file 127

undelete try to retrieve any files accidentally deleted 144

unformat a: try to unformat the disk in drive A 124

ver say which version of DOS is being used 117

win start running Windows 137

xcopy a: b: /s copy all files and subdirectories from A to B 145

Equation Meaning Page

buffers=40 handle 40 sectors at once 133

device=dos\emm386.exe ram d=64 use expanded RAM 133

device=dos\himem.sys /testmem:off use extended RAM 132

device=dos\interlnk.exe be client in Interlnk network 225

devicehigh=dos\setver.exe handle old software 134

devicehigh=toshiba.sys /d:mscd000 use CD-ROM drive 134

dos=high,umb use high & upper RAM 133

files=50 handle 50 files at once 133

lastdrive=f accept drives A through F 134

stacks=0,0 create no stacks 133

Get to the standard C prompt

Here’s how to start using DOS.

I’ll assume DOS is already on your hard disk. If you’ve been using Windows (version 3.1 or 3.11 or 95 or any other popular version), congratulations: DOS is already on your hard disk! Even if you don’t have Windows, DOS is probably on your hard disk anyway, since nearly all computers that have hard disks are sold with DOS already on the hard disk.

Turn on the computer, without any disks in the floppy drives. (For details, read "Prepare to operate" on page 94. For free help, phone me anytime at 617-666-2666.)

Your next goal is to make this symbol appear at the screen’s bottom:

C:\>

That symbol is called the standard C prompt. Notice that it consists of 4 characters: a capital C, a colon, a backslash, and a greater sign.

Using Windows 95? Here’s the best way to make the standard C prompt appear if you’re using Windows 95:

Make sure the screen’s bottom left corner says "Start". Then using your mouse, click the word "Start", then the word "Programs", then "MS-DOS Prompt". The computer will say "C:\WINDOWS". Then on the keyboard, type "cd \" (and press the ENTER key). The computer will say "C:\>". Then try this experiment: while holding down the Alt key, tap the ENTER key once or twice, until the screen’s appearance pleases you.

Using Windows 3.11 or earlier? Here’s the best way to make the standard C prompt appear if you’re using Windows 3.1 or 3.11 (or any earlier version of Windows):

If your screen’s bottom line already says "C:\>", you’re done! Otherwise, do the following.… Make sure the screen’s top line says "Program Manager". Then using your mouse, click the word "File" (near the screen’s top right corner), then the word "Exit", then the word "OK". The computer will probably say "C:\>". If the computer says something else instead (such as "C:\WINDOWS"), make it say "C:\>" by doing this: type "cd \" (and press the ENTER key).

Not using Windows? Here’s the best way to make the standard C prompt appear if you not using Windows:

The screen’s bottom line probably says "C:\>" already. If not, here’s what to do.…

If the bottom message says "C:\DOS>" or "C:\WINDOWS>" or "C:\MENU>" or "C:\WP>" or something similar, type "cd \" (then press the ENTER key).

If the bottom message says "C>", type "prompt $p$g" (then press the ENTER key).

If the bottom message says "D>" or "E>" or "F>" or begins with "D:" or "E:" or "F:", type "c:" (then press the ENTER key).

If the bottom message says "Enter new date (mm-dd-yy)", press the ENTER key twice.

If the screen’s top line says "MS-DOS Shell" or "Start Programs", press the F3 key.

If the screen shows a list of choices, choose "Exit to DOS".

If the screen says "A>" or "A:\>" or "Non-System disk or disk error" or "1LIST", you probably have disks stuck in the floppy drives (or else your hard disk lacks DOS or is defective or missing). Remove any disks from the floppy drives. Then turn the computer off, wait until the computer is quiet, then try turning the computer back on.

After doing one of those actions, check whether the screen says "C:\>". If it does not say "C:\>" yet, look through that list of actions again, and keep trying until you finally see "C:\>".

Use those methods This chapter assumes you made the standard C prompt appear by using one of those methods. Though Microsoft keeps inventing alternative methods to make the standard C prompt appear, the alternative methods consume more RAM or omit some DOS drivers, and so DOS commands and programs don’t work as well. To avoid disappointments, use just the best methods of making the standard C prompt appear, which I listed above!

How to shut down

When you finish using the computer, here’s the safest way to shut the computer down, so you don’t lose any data.

First, make the computer display the standard C prompt, so the screen’s bottom message is this:

C:\>

If you’re using Windows 95, do this:

Type the word "exit" (and press ENTER). Then click "Start" then "Shut Down", then press the ENTER key, then wait until the computer says "It’s now safe to turn off your computer".

If you’re not using Windows 95, wait 10 seconds.

The purpose of that wait is to let the DOS 6.0 version of the SMARTDRIVE caching program finish editing your hard disk. While it edits, you’ll hear some clicking sounds. If you’re sure you’re not using that caching program or a similar program, you don’t need to wait. If you’re using a different version of SMARTDRIVE — such as the version that comes with DOS 5 or DOS 6.2 or Windows — you don’t need to wait.

Remove any floppy disks from the drives. If your screen is a monitor, turn it off. Then turn off the computer.

Simple commands

After the C prompt (which is "C:\>"), the computer waits for you to type a DOS command. When typing a DOS command, remember these principles:

Type the command after the C prompt. Remember that the C prompt is typed by the computer, not by you.

To capitalize a letter, or type a character that’s on the top part of a key, hold down the SHIFT key; and while you keep holding down the SHIFT key, tap the key that has the character you want.

If you type a command incorrectly, press the BACKSPACE key, which is above the ENTER key and has a left-arrow on it.

When you finish typing a command, press the ENTER key. That key makes the computer read what you typed.

Start by trying these simple DOS commands.…

Version (ver)

After the C prompt you can type "ver", like this:

C:\>ver

(When you finish typing that command, remember to press the ENTER key.)

The "ver" command makes the computer tell you which VERsion of MS-DOS you’re using. For example, if you’re using MS-DOS Version 6.2, the computer will say:

MS-DOS Version 6.20

If you’re using MS-DOS Version 95 (which is part of Windows 95), the computer will say:

Windows 95

Echo

The computer’s your obedient slave: it will say whatever you wish!

For example, here’s how to make the computer say "wow". After the C prompt, type "echo wow", like this:

C:\>echo wow

(To type the space after the word echo, press the SPACE bar, which is the long horizontal bar at the bottom of the keyboard.) Remember to press the ENTER key at the end of that command. Then the computer will say:

wow

If you want the computer to say it loves you, type this:

C:\>echo I love you

(To capitalize the letter I, hold down the SHIFT key; and while you keep holding down the SHIFT key, tap the I key.) That command makes the computer say:

I love you

If you want the computer to say it likes strawberry ice cream, type this:

C:\>echo I like strawberry ice cream

Then the computer will say:

I like strawberry ice cream

Be creative! Make the computer say something wild!

Notice that the echo command makes the computer act like a canyon: whatever you say into the computer, the echo command makes the computer echo back.

Clear screen (cls)

Suppose you make the computer say "I love you" (and other things that are even wilder), and then your boss walks by. You might be embarrassed to let your boss see your love messages. Here’s how to hide all the screen’s messages.

After the C prompt, type "cls", like this:

C:\>cls

The "cls" command makes the computer CLear the Screen, so all messages on the screen are erased and the screen becomes blank. The only thing that will remain on the screen is —

C:\>

so that you can give another command.

Date

The computer has a built-in calendar. To use it, type "date" after the C prompt like this:

C:\>date

That makes the computer tell you the date. For example, if today is Wednesday, January 24, 1996, the computer should say:

Current date is Wed 01-24-1996

To remember the date, the computer uses its built-in digital clock/calendar. If the clock/calendar’s battery has run down or is missing, the computer will say a wrong date.

Confirming the date After the computer says what it thinks the date is, it says:

Enter new date (mm-dd-:

If the computer’s date seems correct, press the ENTER key.

If you notice that the computer’s date is wrong, remind the computer of the correct date. For example, if the correct date is January 24, 1996, type "1-24-96" then press ENTER at the end of that date. (Do not type "Wednesday" or "Wed"; the computer will figure that out automatically.)

Time

To find out what time it is, type "time" after the C prompt like this:

C:\>time

That makes the computer tell you the time.

For example, if the time is 2.71 seconds after 1:45AM, the computer will say:

Current time is 1:45:02.71a

The "a" means "AM". (If your DOS is classic, it will omit the "a".)

If the time is 2.71 seconds after 1:45PM, the computer will say:

Current time is 1:45:02.71p

The "p" means "PM". (If your DOS is classic, it will omit the "p", use a 24-hour clock, and say "13:45:02.71".)

To remember the time, the computer uses its built-in digital clock. The computer will say a wrong time if the clock’s battery has run down or is missing, or the clock’s thinking has been interrupted by other computer activities, or your town has switched to daylight savings time, or you’ve taken the computer on an airplane to a different time zone.

 

Confirming the time After the computer says what it thinks the time is, it says:

Enter new time:

If the computer’s time seems correct, press the ENTER key.

If you notice that the computer’s time is wrong, remind the computer of the correct time. For example, if the correct time is exactly 1:45PM, type "1:45p" (for modern DOS) or "13:45" (for classic DOS); then press ENTER at the end of that time.

Directory (dir)

After the C prompt you can type "dir", like this:

C:\>dir

That "dir" command makes the computer show you a directory of the files that are stored on the hard disk.

If you’re using DOS 6.2, the directory looks like this:

DOS <DIR> 06-01-94 3:53a

TEMP <DIR> 06-01-94 4:20a

WINDOWS <DIR> 06-02-94 3:10a

WP <DIR> 06-19-94 6:24p

QA <DIR> 06-04-94 5:48p

MSOFFICE <DIR> 11-24-94 10:10p

BACKUP <DIR> 06-09-94 4:06p

COMMAND COM 54,619 09-30-93 6:20a

CONFIG SYS 182 06-28-95 11:12p

AUTOEXEC BAT 166 06-29-95 12:39a

DO BAT 44 06-09-95 11:18p

(On your computer, the directory might look slightly different, depending on what your hard disk contains and which version of DOS you’re using. For example, if your DOS is earlier than version 6.2, it’s too stupid to put commas in big numbers such as 54,619.)

In that sample directory, one line says:

COMMAND COM 54,619 09-30-93 6:20a

That line says the hard disk has a file whose name is "COMMAND.COM"; that file contains 54,619 bytes and was last updated on September 30, 1993, at 6:20AM.

The next line says the disk also has a file named "CONFIG.SYS", which contains 182 bytes and was last updated on June 28, 1994 at 11:12PM. The lines underneath say that the disk also has a file called "AUTOEXEC.BAT" and a file called "DO.BAT".

Extensions Notice that a file’s name (such as "AUTOEXEC.BAT") consists of up to 8 characters (such as "AUTOEXEC"), then a period, then an extension of up to 3 characters (such as "BAT"). The period separates the main part of the filename from the extension.

In the directory that the computer prints on your screen, each line shows a file’s name and extension but doesn’t bother showing the period.

The period is called a dot. So if you’re chatting with another computer expert about "AUTOEXEC.BAT", pronounce it "AUTOEXEC dot BAT".

The computer can handle many different types of files. Each type has a different extension:

Extension What the file contains

.BAT a BATch of DOS commands

.COM a short program that’s been COMpiled

.EXE a fancy program that you can EXEcute

.BAS a program written by using BASIC

.PRG a PRoGram written by using DBASE or FOXPRO

.SYS list of hardware you bought & how you want SYStem to operate

.386 info that’s useful just if your CPU is a 386 (or 486 or Pentium)

.TXT TeXT that you can read

.HLP messages that HeLP you learn how to use a program you bought

.DOC DOCument written by a word processor such as Microsoft Word

.OLD an OLD, outdated version, being kept just in case of emergency

.BAK a BAcKup version, being kept just in case of emergency

.DAT DATa

.TMP TeMPorary data, which the computer will use and then erase

.INI data to INItialize a program, so the program starts properly

.DBF a DataBase File that contains data used by DBASE or FOXPRO

.DTF a DaTabase File that contains data used by Q&A

.IDX an InDeX to a database file

.XLS an EXceL Spreadsheet, created by using the Excel program

.WK1 a WorKsheet created by using the 1-2-3 spreadsheet program

.WQ1 a Worksheet created by using Quattro (which imitates 1-2-3)

Folders The sample directory’s top line says:

DOS <DIR> 06-01-94 3:53a

That line says the hard disk has a file named "DOS". The <DIR> means that the file is actually a directory folder that contains other files! That folder was created on June 1, 1994 at 3:53AM; many items have been put in that folder since then.

The next line says:

TEMP <DIR> 06-01-94 4:20a

That means the hard disk has a folder named "TEMP", created on June 1, 1994 at 4:20AM.

The lines underneath say that the hard disk also has folders named "WINDOWS", "WP", "QA", "MSOFFICE", and "BACKUP".

Summary statistics When the computer finishes printing the directory, it prints summary statistics:

11 file(s) 55,011 bytes

21,426,176 bytes free

That means the directory contains 11 files. (7 of them are folders, such as DOS and WINDOWS. The other 4 are simple files, such as COMMAND.COM and CONFIG.SYS.)

The simple files consume 55,011 bytes altogether. The hard disk uses other bytes to store the folders and any files that are in the folders.

(If your DOS is classic, it doesn’t bother to say "55,011 bytes".)

Besides the simple files, folders, and files in folders, the hard disk also contains these 6 special items: 2 hidden files (called "IO.SYS" and "MSDOS.SYS"), 2 copies of the file allocation table (FAT), the boot record, and the directory itself.

The "21,426,176 bytes free" means that over 21 million bytes on the hard disk are still unused. (On your computer, the number of bytes free might be different.)

 

Pausing When you type "dir", the computer tries to show you a directory of the files that are stored on the hard disk. If your hard disk has more files than can fit on the screen, the list of files moves up the screen too quickly for you to read.

Here’s how to see the directory more easily.…

Instead of typing "dir", type "dir /p", like this:

C:\>dir /p

That means "directory pausing". When you give that command, the computer starts printing the directory on the screen; but when the screen becomes full, the computer pauses and says:

Press any key to continue…

While the computer pauses, read the part of the directory that’s on the screen. When you finish reading that part, strike a key (such as the ENTER key). Then the computer will print the rest of the directory, pausing at the end of each screenful (page).

So "dir /p" means "directory, pausing at the end of each page" (or "directory paged").

Wide If you type "dir /w", you’ll see a directory that’s wide and leaves out the details; the computer will print:

[DOS] [TEMP] [WINDOWS] [WP] [QA]

[MSOFFICE] [BACKUP] COMMAND.COM CONFIG.SYS AUTOEXEC.BAT

DO.BAT

What’s a switch? A switch is a comment that begins with a slash. You’ve already learned about two switches: "/p" and "/w".

To type the slash, make sure you press the forward slash key, which says "/" on it. Do not press the key that says "\", which is a backslash.

If you wish, you can put a blank space before the slash. The blank space is optional. For example, you can say either "dir /p" or "dir/p".

You can combine switches. For example, if you want the directory to pause and also be wide, say "dir /p/w".

The computer doesn’t care which switch you type first: typing "dir /p/w" does the same thing as typing "dir /w/p".

Fancy switches (in modern DOS) If your DOS is classic, skip ahead to the next section, entitled "Attributes". Modern DOS understands these fancy switches.…

Order. You can put the letter O after dir, like this: "dir /o". That shows you the directory in alphabetical order: the computer lists the folders from A to Z, then lists the other files from A to Z, like this:

BACKUP <DIR> 06-09-94 4:06p

DOS <DIR> 06-01-94 3:53a

MSOFFICE <DIR> 11-24-94 10:10p

QA <DIR> 06-04-94 5:48p

TEMP <DIR> 06-01-94 4:20a

WINDOWS <DIR> 06-02-94 3:10a

WP <DIR> 06-19-94 6:24p

AUTOEXEC BAT 166 06-29-95 12:39a

COMMAND COM 54,619 09-30-93 6:20a

CONFIG SYS 182 06-28-95 11:12p

DO BAT 44 06-09-95 11:18p

If you want to see the directory in chronological order (from the oldest date to the newest date), say "dir /od" (which means "DIRrectory in Order of Date"). If you want to see the directory in order of size, say "dir /os"; that makes the computer display the folders first, then display the other files in order of size, from the smallest number of bytes to the largest.

If you want to see the directory alphabetized by extension (so that all the .BAT files come before the .COM files), say "dir /oe" (which means "DIRectory in Order of Extension"). Better yet, say "dir /oen" (which means "DIRectory in Order of Extension and Name"), so that all the .BAT files come before the .COM files, and all the .BAT files are in alphabetical order.

At the end of any of those commands, you can put "/p" to make the computer pause at the end of each screenful.

Lowercase. You can put the letter L after dir, like this: "dir /l". That shows you the directory in lowercase letters instead of capitals, so you see this:

dos <DIR> 06-01-94 3:53a

temp <DIR> 06-01-94 4:20a

windows <DIR> 06-02-94 3:10a

wp <DIR> 06-19-94 6:24p

qa <DIR> 06-04-94 5:48p

msoffice <DIR> 11-24-94 10:10p

backup <DIR> 06-09-94 4:06p

command com 54,619 09-30-93 6:20a

config sys 182 06-28-95 11:12p

autoexec bat 166 06-29-95 12:39a

do bat 44 06-09-95 11:18p

That L switch was invented because most people can read lowercase words faster than capitalized words.

Brief. You can say "dir /b". That makes the computer print the directory briefly, without bothering to print each file’s length, time, and date, and without bothering to print summary statistics. The computer will print just:

DOS

TEMP

WINDOWS

WP

QA

MSOFFICE

BACKUP

COMMAND.COM

CONFIG.SYS

AUTOEXEC.BAT

DO.BAT

The computer will print it very fast — instantly!

The computer doesn’t understand "dir /b/w". If you say "dir /b/w", the computer ignores the /w and does just "dir /b".

 

Attributes Some files have special qualities, called attributes.

For example, your hard disk contains two special files, called "IO.SYS" and "MSDOS.SYS". Those files contain the fundamentals of DOS and must never be erased! To prevent you from accidentally erasing them, the computer hides them from you, so you don’t even know they’re there! When you say "dir", the computer is sneaky and purposely avoids mentioning those two files!

Modern DOS lets you say "dir /a", which makes the computer show a directory of All files, including even the files that are hidden! If you say "dir /a/p", the computer will pause at the end of each screenful.

Modern DOS also lets you say "dir /ah", which makes the computer show a directory of All the Hidden files but not the other files. For example, if you say "dir /ah" using DOS 6.2, the typical computer will say:

IO SYS 40,566 09-30-93 6:20a

MSDOS SYS 38,138 09-30-93 6:20a

The computer might say you also have a hidden file called "386SPART.PAR", which is huge: typically about 20,000,000 bytes! It’s called the permanent swap file and helps Windows run faster.

If you’re using PC-DOS instead of generic MS-DOS (because your computer’s built by IBM instead of being a generic clone), the "IO.SYS" and "MSDOS.SYS" files are named "IBMBIO.COM" and "IBMDOS.COM" instead.

Modern DOS lets you see the names of all your folders (directories). Just say "dir /ad". That makes the computer show a directory of All Directories. The computer will say:

DOS <DIR> 06-01-94 3:53a

TEMP <DIR> 06-01-94 4:20a

WINDOWS <DIR> 06-02-94 3:10a

WP <DIR> 06-19-94 6:24p

QA <DIR> 06-04-94 5:48p

MSOFFICE <DIR> 11-24-94 10:10p

BACKUP <DIR> 06-09-94 4:06p

What’s in a folder? To find out what’s in a folder, say "dir" then the folder’s name. For example, to find out what’s in the DOS folder, say "dir dos", like this:

C:\>dir dos

You can put a switch at the end of that command:

C:\>dir dos /p

To find out what’s in the WINDOWS folder, say "dir windows". (That command works just if you have a WINDOWS folder. If you do not have a WINDOWS folder, the computer gripes by saying "File not found".)

Saying "dir dos" shows you the files that are in the DOS folder. That list of files is called the DOS directory. Saying "dir windows" shows you the files that are in the Windows folder; that list of files is called the Windows directory. Saying just "dir" shows you the files that are not in folders; that list of files is called the main directory (or root directory).

So to see the root directory, just type "dir" after the standard C prompt, like this:

C:\>dir

The other directories (such as the DOS directory and the Windows directory) are called subdirectories.

Just one file To find info about one file, say "dir" then the file’s name. For example, to find info about "COMMAND.COM", say "dir command.com". The computer will print:

COMMAND COM 54,619 09-30-93 6:20a

Versions of COMMAND.COM To tell which version of COMMAND.COM you have, use this chart:

COMMAND.COM version Size Date Time

COMMAND.COM in MS-DOS 5 47,845 bytes 04-09-91 5:00a

COMMAND.COM in MS-DOS 6 52,925 bytes 03-10-93 6:00a

COMMAND.COM in MS-DOS 6.20 54,619 bytes 09-30-93 6:20a

COMMAND.COM in MS-DOS 6.21 54,619 bytes 02-13-94 6:21a

COMMAND.COM in MS-DOS 6.22 54,645 bytes 05-31-94 6:22a

COMMAND.COM in MS-DOS 95 92,870 bytes 07-11-95 9:50a

For those versions, notice that the version number is the same as the time: MS-DOS 5 was invented at 5am, MS-DOS 6 was invented at 6am, MS-DOS 6.20 was invented at 6:20am, and MS-DOS 95 (in Windows 95) was invented at 9:50am. So either Microsoft programmers do all their work early in the morning, or else Microsoft lies about the time.

Most computerists believe that Microsoft lies about the time — not just the time when COMMAND.COM was invented, but also the time when future products will come out. As Microsoft programmers say, "Time is reprogrammable."

What if your COMMAND.COM does not say 5am, 6am, 6:20am, 6:21am, 6:22am, or 9:50am, or your COMMAND.COM has a different date or size than listed in that chart? Then you’re probably using an older version (such as version 4, which was timed at 12am), or an even newer version (such as DOS 97?), or a variant version (such as IBM PC-DOS), or a version that’s been infected by a virus.

Try this experiment: examine your DOS directory by saying "dir dos /p". (If you’re using DOS 95, say "dir windows\command /p" instead.) You’ll notice that most of your DOS files have the same date and time as your COMMAND.COM.

Wildcards The symbol "*" is called an asterisk or a star. To type it, tap the 8 key while holding down the SHIFT key.

Try this experiment: type "dir *.bat". (That command is pronounced "dir star dot bat".) That makes the computer print an abridged directory, showing information about just the files whose names end in ".bat". The computer will print:

AUTOEXEC BAT 106 06-29-95 12:39a

DO BAT 44 06-09-95 11:18p

The symbol "*" means "anything". That’s why saying "dir *.bat" makes the computer show a directory of anything that ends in ".bat".

To see a directory of files whose names begin with d, say "dir d*". The computer will print:

DOS <DIR> 06-01-94 3:53a

DO BAT 44 06-09-95 11:18p

A symbol (such as "*") that "matches anything" is called a wildcard.

Different drives Your computer’s main floppy drive is called drive A. If your computer has two floppy drives, the second floppy drive is called drive B. In most computers, drive A is on top of drive B or to the left of drive B.

The main part of your computer’s main hard drive is called drive C. If your computer has more than one hard drive, or its hard drive is partitioned into several parts, or you have a CD-ROM drive, or your computer is wired to other computers on a computer network, those additional disk surfaces are called drive D, drive E, drive F, etc.

To practice using drive A, try this experiment.…

Step 1: find drive A. It’s the main floppy drive. If your computer has two floppy drives, drive A is probably on top of drive B or to the left of drive B.

Step 2: notice drive A’s size. Take a ruler and measure the slot in drive A. If the slot is 5¼ inches long, drive A is called 5¼-inch. If the slot is 3½ inches long, drive A is called 3½-inch.

Step 3: grab a floppy disk. Pick a disk the same size as drive A. (For example, if drive A is 5¼-inch, pick a disk that’s 5¼-inch.) Pick a disk that contains information already. (For example, pick a floppy disk that contains DOS or Windows or Word Perfect or a game or some other program or data.)

Step 4: put that disk into drive A. If the drive’s slot is horizontal, make sure the disk’s label is on TOP of the disk; if the slot is vertical, make sure the disk’s label is on the disk’s LEFT side. If the disk is 5¼-inch, it has a big oval cutout; if the disk is 3½-inch, it has a chrome metal slider; make sure that cutout or slider goes into the drive BEFORE the label does. If the disk is 5¼-inch, close the drive’s door, as follows: if the slot is horizontal, pull the door latch down; if the slot is vertical, pull the door latch to the right.

Step 5: type "dir a:". You can type "dir a:" after the standard C prompt, so your screen looks like this:

C:\>dir a:

To type the colon ":", make sure you hold down the SHIFT key.

If you’re lucky, the computer will print a directory that lists the files on drive A’s disk.

If you’re unlucky, the computer will gripe by saying "Not ready reading drive A" or "General failure reading drive A". Then the computer will ask:

Abort, Retry, Fail?

To respond, choose Abort (by pressing the A key). Then the computer will say "C:\>" again. Try again to do the five steps properly. (Make sure you don’t insert the disk backwards or upside-down. If you’re using a 5¼-inch disk, make sure you close the door. If you’re still having trouble, try using a different floppy disk or the other floppy drive.)

Once you’ve mastered the art of typing "dir a:", be bold: experiment! For example, try typing switches (such as "dir a: /p") or wildcards (such as "dir a:*.bat" or "dir a:w*"). Try putting other floppy disks into drive A, and find out what’s on them (by typing "dir a:" again).

If you have a drive B, put a floppy disk into it and find out what’s on that disk by typing "dir b:".

Change drive (a: or b: or c:)

When the computer is waiting for you to type a DOS command, the computer normally prints this prompt:

C:\>

That’s called the standard C prompt. It means the computer is thinking about drive C.

A prompt Here’s how to change the prompt, so the computer will think about drive A instead of drive C. In drive A put a floppy that contains info, then say "a:", so your screen looks like this:

C:\>a:

When you press ENTER at the end of that line, the computer changes the prompt to this:

A:\>

That’s called the A prompt. It means that the computer is thinking about drive A.

After the A prompt, try saying "dir", so your screen looks like this:

A:\>dir

Because of the A prompt, that "dir" makes the computer print a directory of drive A (instead of drive C).

When you finish using the floppy in drive A and want to use the hard disk again, make the computer return to a standard C prompt. Here’s how. After the A prompt, type "c:", so your screen looks like this:

A:\>c:

When you press ENTER at the end of that line, the computer will change the prompt back to this:

C:\>

The drive the computer thinks about is called the current drive (or default drive). If the computer says "C:\>", the default drive is C; if the computer says "A:\>", the default drive is A.

So to make A become the default drive, say "a:" (and press ENTER). To make C become the default drive again, say "c:" (and press ENTER).

B prompt If you have a drive B, try this experiment: in drive B put a floppy that contains info, then say "b:" (and press ENTER). The computer changes the prompt to this:

B:\>

Then if you type "dir", the computer will print a directory of drive B. To return to a C prompt, type "c:" (and press ENTER).

Change directory (cd)

One of the folders on your hard disk is called DOS. To find out what’s in that folder, you can say "dir dos" after the C prompt, like this:

C:\>dir dos

Here’s another way to find out what’s in the DOS folder. Say "cd dos". (The "cd" means "change directory".) That makes the computer think about the DOS folder. The computer changes the prompt to this:

C:\DOS>

That means the computer is thinking about drive C’s DOS folder. If you type "dir" after that prompt, the computer will print a directory of the files in drive C’s DOS folder.

When you finish using the DOS folder, you should return to the standard C prompt by saying "cd \". (Make sure you type a backslash \, not a forward slash /.) Then the computer will print a standard C prompt again:

C:\>

Suppose your hard disk contains a WINDOWS folder. Here’s how to explore what’s in that folder.…

First, make sure the screen shows a standard C prompt: "C:\>". Then say "cd windows". That makes the computer think about the WINDOWS folder, so the computer changes the prompt to this:

C:\WINDOWS>

To find out what’s in that WINDOWS folder, say "dir /p", which makes the computer print a directory of the files in the WINDOWS folder.

You get a surprise: one of the files in the WINDOWS folder is another folder, called SYSTEM. Yes, SYSTEM is a folder that’s inside the WINDOWS folder.

To find out what’s in the SYSTEM folder, say "cd system" after the prompt, so your screen looks like this:

C:\WINDOWS>cd system

That makes the computer think about the SYSTEM folder inside the WINDOWS folder, so the computer changes the prompt to this:

C:\WINDOWS\SYSTEM>

Then if you say "dir", the computer will print a directory of the files in the WINDOWS SYSTEM folder.

Parents When a folder is inside another folder, the situation resembles a pregnant woman: the inner folder is called the child; the outer folder is called the mommy (or parent). For example, the SYSTEM folder is the child of the WINDOWS folder.

When you finish using the SYSTEM folder, you have a choice. If you say "cd ..", those two periods make computer return to the mommy folder (WINDOWS) and say:

C:\WINDOWS>

If instead you say "cd \", the backslash makes the computer return to the root directory and say:

C:\>

Saying "cd .." is therefore called "returning to mommy". Saying "cd \" is called "returning to your roots". Whenever you feel lost and scared, return to mommy or your roots!

Pointer files Socrates warned, "Know thyself." Freud warned, "Be prepared to tell me about your mother."

To obey their warnings, each folder contains a Socrates file and a Freud file. The Socrates file, called ".", reminds the folder of what files are in the folder. The Freud file, called "..", reminds the folder of who the folder’s mother is, so the computer will know what to do when you type "cd ..".

That’s why, when you’re in the middle of a folder and say "dir", the first two files you see in the directory are called "." and "..". They’re called pointer files because they point to the folder’s inner self and mommy.

Short cut Suppose the computer says:

C:\DOS>

That means the computer is thinking about the DOS folder. To make the computer think about the WINDOWS SYSTEM folder instead, you can use two methods.

The normal method is to say "cd \" (which makes the computer leave the DOS folder and return to the standard C prompt), then say "cd windows", then say "cd system".

The shorter method is to combine all those cd commands into this single command: "cd \windows\system". In that command, make sure you type the backslashes.

Backslash versus forward slash Don’t confuse the backslash (\) with a forward slash (/).

Type a backslash (\) when you’re discussing folders, such as "cd \windows\system".

Type a forward slash (/) when you’re giving switches, such as "dir /p" or "dir /w".

External commands

So far, you’ve learned 7 major commands: ver, echo, cls, date, time, dir, and cd. How does the computer understand them?

When you turn on the computer, the computer automatically runs a program called "COMMAND.COM", which teaches the computer how to react to those commands. Since the definitions of those commands are stored inside COMMAND.COM, those commands are called internal commands.

Now you’re going to learn 3 fancy commands whose definitions are too long to fit in COMMAND.COM. The 3 fancy commands are "format" (which puts a format onto a disk), "diskcopy" (which makes a copy of a disk), and "chkdsk" (which checks your disk). Don’t type them until I fully explain how to use them.

The definition of "format" is in a file called "FORMAT.COM". The definition of "diskcopy" is in a file called "DISKCOPY.COM". The definition of "chkdsk" is in a file that classic DOS calls "CHKDSK.COM" but modern DOS calls "CHKDSK.EXE".

Since the definitions of "format", "diskcopy", and "chkdsk" lie outside of COMMAND.COM, those 3 commands are called external commands.

When you give one of those external commands, the computer tries to obey the command by running the FORMAT.COM program, DISKCOPY.COM program, CHKDSK.COM program, or CHKDSK.EXE program.

If your computer is set up normally, those programs are in drive C’s DOS folder. In that case, if you say —

C:\>dir dos /p

you’ll see that the DOS directory includes FORMAT.COM, DISKCOPY.COM, and CHKDSK.EXE (or CHKDSK.COM).

But alas, your computer might be set up abnormally. Those programs might be in the root directory instead of in a DOS subdirectory. Those programs might be in a subdirectory which, instead of being called "DOS", is called "BIN" or "UTIL". Those programs might be on a drive D instead of C.

If you’re using DOS 95 (which is part of Windows 95), those programs are typically on drive C in a subdirectory called "WINDOWS\COMMAND".

Where are those programs in your computer? Find out now! Say —

C:\>dir dos /p

If you see that the DOS directory includes FORMAT.COM, DISKCOPY.COM, and CHKDSK.EXE (or CHKDSK.COM), you’re lucky. If you’re unlucky, explore other directories (by saying " dir /p" or "dir bin /p" or "dir util /p" or "dir d: /p" or "dir a: /p" or "dir windows\command /p"), until you find the directory that contains those external DOS programs.

Check disk (chkdsk)

To check your computer’s disk and RAM, type "chkdsk". Try it now!

If your computer is set up properly, it has a feature called path to DOS, so you can type "chkdsk" after any prompt, so your screen looks like this —

C:\>chkdsk

or like this —

C:\DOS>chkdsk

or like this —

C:\WINDOWS>chkdsk

or even like this —

C:\WINDOWS\SYSTEM>chkdsk

Then the computer will print a message saying how many bytes are in your hard drive and your RAM.

Example For example, when I say "chkdsk" on my old computer, the computer prints this message:

212,058,112 bytes total disk space

81,920 bytes in 2 hidden files

389,120 bytes in 85 directories

190,115,840 bytes in 3,324 user files

45,056 bytes in bad sectors

21,426,176 bytes available on disk

4,096 bytes in each allocation unit

51,772 total allocation units on disk

5,231 available allocation units on disk

655,360 total bytes memory

634,464 bytes free

The top line says the hard disk is big enough to hold 212,058,112 bytes altogether. That’s about 212 million bytes. Since a million bytes is about the same as a megabyte, that’s about 200 megabytes.

The next line says 81,920 bytes are in the 2 hidden files (IO.SYS and MSDOS.SYS).

The next line says the disk contains 85 folders (subdirectories). For each folder, the computer must store the folder’s name and a list of which files are in the folder. Altogether, those 85 folder names and 85 folder lists consume 389,120 bytes.

The disk contains 3,324 user files. (Those are the files that aren’t hidden and aren’t names of folders.) Some of those files are in the root directory and can be seen when you type "dir"; the rest of those files are buried in folders. Altogether, those 3,324 user files consume 190,115,840 bytes.

It’s difficult to manufacture a flawless hard disk. Most hard disks contain some unreliable areas, which are called bad sectors. According to the "chkdsk" command, my computer knows that 45,056 bytes on the hard disk’s surface are in bad sectors. Since the computer knows that those sectors are bad, the computer won’t put any data there, and those bad sectors won’t do any harm.

The typical hard drive contains fewer than 200,000 bytes in bad sectors. The typical floppy disk has no bad sectors at all.

(If your hard disk contains more than 200,000 bytes in bad sectors, or the number of bytes in bad sectors increases rapidly each month, return the disk to your dealer for repair or replacement. If a floppy disk contains any bad sectors at all, buy a different floppy disk instead, since nearby sectors might be partly unreliable, and discount dealers sell new floppy disks for less than $1.)

Although the top line says my hard disk is big enough to hold about 212 million bytes, the lines below show that most of those bytes are used for the 2 hidden files, the 85 folders, the 3,324 user files, and bad sectors. Just 21,426,176 bytes remain unused; they’re available for any additional files we want to put on the disk.

Each file consists of several clusters on the disk’s surface. The next line says that each cluster (allocation unit) consists of 4,096 bytes (which is 4 kilobytes). The next lines say that altogether the disk holds 51,772 clusters, of which 5,231 remain unused.

The bottom two lines discuss the RAM chips, not the hard disk. They say that the RAM chips contain 655,360 bytes (640 kilobytes) of conventional memory. Some of those bytes are used by DOS itself; 634,464 bytes remain unused; they’re available for any program we wish to run.

Actually, I bought more RAM chips — 4 megabytes altogether! But just 640K of them are used for conventional memory. The rest of them are used for extended and expanded memory, which the "chkdsk" command doesn’t analyze.

Even if you buy many megabytes of RAM, the largest RAM quantity that the "chkdsk" command will ever mention is 655,360 bytes, because 655,360 bytes is the largest size that conventional RAM can be.

Bad command When you say "chkdsk", the computer might say:

Bad command or file name

That means the computer can’t find the CHKDSK program. To solve that problem, examine your spelling: maybe you spelled "chkdsk" incorrectly?

If you spelled "chkdsk" correctly, maybe your computer is set up incorrectly. To handle such a computer, remind the computer that the "chkdsk" command is in the DOS subdirectory (by typing "\dos\chkdsk" instead of just "chkdsk").

If you don’t have a DOS subdirectory but instead have a subdirectory called BIN, try typing "\bin\chkdsk". If instead you have a subdirectory called UTIL, try typing "\util\chkdsk".

Different drives If you say "chkdsk" after the C prompt, the computer will check the disk in drive C.

To check the disk in drive A, say "chkdsk a:". To check disk B, say "chkdsk b:".

Lost chains If you accidentally turn off the computer while the computer is in the middle of thinking about a file, the computer might get confused and forget the file’s name and which folder the file belongs to. Such a file, whose identity has been lost, is called a lost chain.

When you say "chkdsk", the computer checks whether your disk contains any lost chains. If the computer notices a lost chain, the computer will say "errors" and might ask:

Convert lost chains to files?

To reply, press the N key.

Fix (in every DOS except 95) If you say "chkdsk" and the computer notices errors on your disk (such as lost chains), the computer tells you about the errors but doesn’t fix them.

To fix the errors, say "chkdsk" again but put "/f" at the end of the command, like this:

C:\>chkdsk /f

The "/f" makes the computer fix minor errors (such as lost chains).

That command works fine in every DOS except DOS 95 (which is part of Windows 95, which has its own way of fixing errors). If you’re using DOS 6.2, the computer says:

Instead of using CHKDSK /F, try using SCANDISK.

Do you still want to run CHKDSK /F (Y/N)?

To reply, press Y then ENTER.

If the computer asks "Convert lost chains to files?", press the N key. Then the computer will get rid of the "lost chains" problem by erasing those chains.

(Almost always, the chains contain fragments of old junk that you want erased. If you press Y instead of N, the computer will turn those chains into files instead of erasing them. The files will be named "FILE0000.CHK", "FILE0001.CHK", "FILE0002.CHK", etc.)

If you want to check the disk in drive A and fix it, say "chkdsk a: /f".

Format (in every DOS)

& unformat (in modern DOS)

Suppose you buy a blank floppy disk. Before you can use that disk, it must be formatted.

You can buy disks that have been formatted. If your disk has not been formatted yet, you must format it yourself; here’s how.

Follow 9 steps To avoid difficulties when formatting, follow these 9 steps.…

Step 1: make sure the disk is blank and a virgin, never used before. Take the disk out of a new, unopened box of blank disks. Do not use a disk that already contains info!

Step 2: make sure the disk is the same size as the drive you plan to put it in. If the drive’s slot is 5¼ inches long, make sure the disk is 5¼-inch. If the drive’s slot is 3½ inches long, make sure the disk is 3½-inch.

Step 3: make sure the disk is the same density as the drive. If the drive is high-density, make sure the disk is high-density. If the drive is double-density, make sure the disk is double-density. Here’s how:

To find out the density of the drive, ask your dealer (or read the ads and manuals that came with the computer). A 5¼-inch drive holds 360K if double-density, 1.2M if high-density. A 3½-inch drive holds 720K if double-density, 1.44M if high-density. In a typical 8088 computer, the drives are double-density. In a typical 386, 486, or Pentium computer, the drives are high-density. In a typical 286 computer, drive A is high-density; drive B is either a double-density 5¼-inch or a high-density 3½-inch.

To find out the density of the disk, read the disk’s label and the box the disk came in. "HD" means high-density; "DD" means double-density. The typical high-density 3½-inch disk has "HD" stamped on it and has square cutouts in two of the disk’s corners (instead of just one corner). The typical double-density 5¼-inch disk is made of magnetic material that’s brownish-gray (instead of charcoal gray) and has its central hole reinforced by a Mylar ring.

Step 4: temporarily empty the drives. Remove any disks from the floppy drives.

Step 5: get the standard prompt onto the screen. Make the computer say "C:\>".

Step 6: say "format a:" or "format b:" (and press ENTER at the end of that line). If you’re planning to put the blank disk into drive A, say "format a:". If you’re planning to put the blank disk into drive B, say "format b:". Be sure to say "format a:" or "format b:" rather than just "format". Then if you’re lucky, the computer will say:

Insert new diskette

and press ENTER when ready

(If instead the computer says "Bad command or file name", remind the computer which folder FORMAT.COM is in. For example, if FORMAT.COM is in a folder called DOS, say "\dos\format a:"; if FORMAT.COM is in a folder called BIN, say "\bin\format a:".)

Step 7: put the blank disk into the drive. If you said "format a:", put the blank disk into drive A. If you said "format b:", put the blank disk into drive B. If the disk is 5¼-inch, close the drive’s door.

Step 8: press the ENTER key. If you’re lucky, the computer will say "Formatting" and will format the blank disk.

The formatting takes about a minute. During that time, the computer divides the disk’s surface into tracks and sectors, checks the disk’s surface for flaws, and puts these 4 items onto the disk: the boot record, the directory, and 2 copies of the file allocation table (FAT). When the formatting is finished, the computer will say "Format complete".

(If the computer gripes, try again to do steps 1-8 correctly!)

Step 9: answer questions. If you’re using modern DOS or DOS 4, the computer will ask:

Volume label (11 characters, ENTER for none)?

Then you can invent a name for the disk. Keep the name short: no more than 11 characters. Type the name, then press ENTER. (If you’re too lazy to invent a name, press ENTER without typing a name.) Then in the future, whenever you ask the computer to print the disk’s directory, the computer will automatically print the disk’s name at the top of the directory.

At the end of the whole formatting procedure, the computer will ask:

Format another (Y/N)?

If you want to format another blank disk, press the Y key (which means "Yes"); otherwise, press the N key (which means "No"). Then press ENTER.

Mistakes When giving the format command, what happens if you make a mistake?

Make sure the disk you’re formatting was blank. If it wasn’t blank, the computer will automatically make it blank, by destroying the information on it!

Make sure you say which drive to format. To format the disk in drive A, say "format a:". To format the disk in drive B, say "format b:".

If you forget to say "a:" or "b:" after the word "format", the computer gets nasty. Modern DOS and DOS 4 make the computer print this gripe:

Required parameter missing

DOS 3.2 & 3.3 make the computer print this gripe instead:

Drive letter must be specified

If you’re using an even older version of DOS, the computer won’t gripe. Instead, it will format whatever disk is in the default drive, which might not be the drive you intended! For example, if the default drive is C, the computer will format drive C’s hard disk, and so it will erase the information on your hard disk!

Format the whole box If you buy a box of unformatted blank disks, format all the disks in the box immediately. Avoid giving the format command again — until you buy your next box of unformatted blank disks.

Unformat (modern DOS but not 95) Suppose you accidentally format a disk that contained some important files. When the formatting is done, the files seem to be gone.

If you’re using DOS 5, 6, or 6.2, you can get the files back! Just tell the computer to unformat the disk. For example, to unformat the disk in drive A, say "unformat a:". The computer will say, "Press ENTER when ready." Press ENTER. The computer will ask, "Are you sure?" Press Y. Then the computer will unformat the disk. Afterwards, if you say "dir a:", you’ll see that the files are still there!

Unconditional format (modern DOS) Modern DOS lets you say "/u" at the end of the format command, like this: "format a: /u". That formats the disk faster, so you don’t have to wait long for the formatting to finish. The "/u" also reduces the chance that the computer will gripe at you. To make modern DOS to format a disk, I usually say "/u".

The only disadvantage of saying "format a: /u" is that the disk cannot be unformatted. The "/u" tells the computer to format unconditionally and not waste time worrying about whether you’ll change your mind and want to unformat. Saying "/u" means you’re confident and demand quick results.

Quick format (in modern DOS) Suppose a disk in drive A has been formatted and contains files, but you no longer need those files. To erase all the files on the disk, you can just reformat the disk by again saying "format a:".

Unfortunately, saying "format a:" makes you wait about a minute, while the computer erases the files and divides the disk’s surface into tracks and sectors again.

Modern DOS lets you reformat faster by saying "format a: /q/u". The "/q" tells the computer to reformat quickly, by erasing the files but not bothering to redivide the disk’s surface into tracks and sectors; the computer will reuse the tracks and sectors. The "/u" tells the computer to reformat unconditionally, without preparing for the possibility of an unformat. The computer accomplishes "format a: /q/u" in just a few seconds.

Double-density format (DOS 3 & up) Suppose you buy a double-density disk. If you want to format it, the most reliable way is to use a double-density drive. If you lack a double-density drive, try formatting the double-density disk in a high-density drive, helped by one of the trick format commands listed below. These trick format commands work well if the disk is 3½-inch. If the disk is 5¼-inch, these tricks are less reliable, but you’re welcome to try them anyway!

Here are the tricks for trying to format a double-density disk in high-density drive A.…

Modern DOS and DOS 4 let you do this:

If the disk is 3½-inch, say "format a: /f:720", which means format for 720K.

If the disk is 5¼-inch, say "format a: /f:360", which means format for 360K.

To make modern DOS finish the format faster and with less chance of griping, put "/u" at the command’s end:

If the disk is 3½-inch, say "format a: /f:720 /u".

If the disk is 5¼-inch, say "format a: /f:360 /u".

DOS 3.3 doesn’t understand "/f:". Do this instead:

If disk is 3½-inch, say "format a: /n:9". The "/n:9" means 9 sectors per track.

If disk is 5¼-inch, say "format a: /4". The "/4" means 40 tracks.

Those are the commands to format a double-density disk in a high-density drive.

DOS 3, 3.1, and 3.2 can’t handle high-density 3½-inch drives but use the same command as DOS 3.3 for handling high-density 5¼-inch drives. DOS 1, 1.1, 2, and 2.1 can’t handle high-density drives at all.

Diskcopy

To copy a floppy disk, give the "diskcopy" command. It copies info from one floppy disk (called the source) to a blank floppy (called the target). It copies the entire disk, so that at the end of the process the target disk will become an exact clone of the source disk.

Follow 7 steps To avoid difficulties when copying disks, follow these 7 steps.…

Step 1: choose a source disk. Decide which disk you want to copy. It must be a floppy disk, since the "diskcopy" command copies just floppy disks, not hard disks.

Step 2: choose a target disk. It should be blank and a virgin, never used before. It must be the same type of disk as the source disk: specifically, it must be floppy, and it must be the same size and density as the source disk. For example, if the source disk is 5¼-inch, the target disk must be 5¼-inch (not 3½-inch); if the source disk is double-density, the target disk must be double-density (not high-density).

Step 3: temporarily empty the drives. Remove any disks from the floppy drives.

Step 4: get the standard prompt onto the screen. Make the computer say "C:\>".

Step 5: say "diskcopy a: b:" or "diskcopy a: a:" or "diskcopy b: b:" (and press ENTER at end of that line). If the source disk can be read by both drives A and B, say "diskcopy a: b:". If the source disk can be read by drive A but not B, say "diskcopy a: a:". If the source disk can be read by drive B but not A, say "diskcopy b: b:".

Confused? Use this chart:

Source disk Drive A Drive B What to type

1.44M 1.44M 1.44M diskcopy a: b:

1.44M 1.44M not 1.44M diskcopy a: a:

1.44M not 1.44M 1.44M diskcopy b: b:

1.2M 1.2M 1.2M diskcopy a: b:

1.2M 1.2M not 1.2M diskcopy a: a:

1.2M not 1.2M 1.2M diskcopy b: b:

360K 5¼-inch 5¼-inch diskcopy a: b:

360K 5¼-inchnot 5¼-inch diskcopy a: a:

360K not 5¼-inch 5¼-inch diskcopy b: b:

720K 3½-inch 3½-inch diskcopy a: b:

720K 3½-inch not 3½-inch diskcopy a: a:

720K not 3½-inch 3½-inch diskcopy b: b:

Then if you’re lucky, the computer will say, "Insert SOURCE disk".

(If instead the computer says "Bad command or file name", remind the computer which folder DISKCOPY.COM is in. For example, if DISKCOPY.COM is in a folder called DOS, give a command such as "\dos\diskcopy a: b:".)

Step 6: insert the appropriate disks and press ENTER. Here are the details.…

What you said What to do now

diskcopy a: b: Put the source disk into drive A.

Put the target disk into drive B.

Press ENTER.

Wait until the computer asks "Copy another"?

diskcopy a: a: Put the source disk into drive A.

Press ENTER.

When computer says so, put target disk in drive A.

Press ENTER.

When computer says so, put source disk into drive A.

Press ENTER.

Continue swapping the source and target disks,

until the computer asks "Copy another"?

diskcopy b: b: Put the source disk into drive B.

Press ENTER.

When computer says so, put target disk into drive B.

Press ENTER.

When computer says so, put source disk into drive B.

Press ENTER.

Continue swapping the source and target disks,

until the computer asks "Copy another"?

During this step, the computer copies info from the source disk to the RAM chips, and then from the RAM chips to the target disk. If the target disk wasn’t formatted previously, the computer formats it automatically while doing this step.

Step 7: press Y or N. If you want to copy another disk, press the Y key (which means "Yes"); otherwise, press the N key (which means "No").

Copy DOS You should make copies of your DOS disks and any other important software you bought, by saying "diskcopy a: b:" (or "diskcopy a: a:"). Then use the copies. Store the original disks in a safe place — so that if a copy ever gets damaged, you can go back to the original.

Copy protection Although the "diskcopy" command usually works, sometimes it doesn’t! The computer might refuse to copy a disk!

That happens if the disk’s programs were written by programmers who fear you’ll give copies of the disk to all your friends without paying royalties. Those programmers alter the disk, to prevent "diskcopy" from working.

A disk altered to prevent the "diskcopy" command from working is said to be a copy-protected disk.

Edit your disks

Here’s how to edit the info on your disks.

Make directory (md)

Let’s create a new folder on your hard disk.

First, get a standard C prompt, so your screen looks like this:

C:\>

Then invent a name for your folder. The name can be up to 8 characters long, such as SARAH or TONY or JUNK or POETRY or FIDDLING. Type "md" then the name.

For example, to Make a Directory called SARAH, say "md sarah" after the C prompt, like this:

C:\>md sarah

At the end of that line, press the ENTER key. The computer will pause briefly, while it creates a SARAH directory. (If the computer says "Directory already exists" or "Unable to create directory", your disk already contained something called SARAH, and you must pick a different name instead.)

Then the computer will say "C:\>" again, so you can give another DOS command.

To prove that the SARAH directory was created, say "dir sarah". The computer will show that SARAH contains two files: Socrates (.) and Freud (..).

Go ahead! Create a folder named SARAH and other folders!

Cd Suppose you’ve created a SARAH folder. If you wish, you can go into the SARAH folder by saying "cd sarah", which means "Change Directory to SARAH". That makes the computer say:

C:\SARAH>

Then if you say "dir", the computer will show you the SARAH directory’s two files. To return to the root directory, say "cd \".

Copy

The Jewish religion prohibits Orthodox Jews from eating ham. That’s why Mary had a little lamb:

Mary had a little lamb,

'Cause Jewish girls can't eat no ham.

If Mary were a Hindu now,

Mary couldn't eat no cow.

Religions all are fine and dandy,

Even my dentist's, which says "No candy!"

But Ma's religion makes me shiver.

That's why mine says "Ma, no liver!"

Copy from console Here’s how to put that poem onto your hard disk and call it MARY.

First, type "copy con mary" after the C prompt, like this:

C:\>copy con mary

(If your hard disk already contains a file named MARY, DOS 6.2 and 95 make the computer ask, "Overwrite MARY?" To reply, press the Y key then ENTER.)

Underneath that typing, type the poem. (If you don’t like that poem, make up your own! If you’re a slow typist, make up a poem that’s shorter to type, or type just the first two lines.)

Underneath your poem, press the F6 key and then the ENTER key. The computer will automatically copy your poem onto the hard disk and call it MARY.

To prove that your computer put the poem onto the disk, look at the hard disk’s directory, by typing "dir /p". You’ll see that one of the files in the directory is MARY.

Your computer’s console consists of the keyboard and screen. Saying "copy con mary" tells the computer that you want to copy from the console (keyboard and screen) to a disk file named MARY.

Copy to console Suppose your disk contains a file called MARY. To find out what’s in MARY, say "copy mary con". That makes the computer copy MARY from the disk to your console’s screen. For example, if MARY was a poem, the poem will appear on your screen.

Filenames You can give a file any short name you wish, such as MARY or LAMBCHOP. Keep the filename short: you can’t make it longer than 8 characters.

At the end of the filename, you can put a period and a 3-character extension.

For example, you can name a file "LAMBCHOP.YUM". In that example, the "LAMBCHOP" is called the filename; the "YUM" is called the extension.

Copy to floppy After you’ve created a file named MARY on your hard disk, you can copy MARY to a floppy disk. Here’s how.

If drive A contains a formatted floppy disk, you can copy MARY to drive A’s disk by saying "copy mary a:". Try it!

(If the computer gripes by saying "Write protect error", your floppy disk is a special kind that can’t be written on. To reply, press the A key, which means "Abort", then try using a different floppy disk instead.)

To prove that MARY’s been copied to drive A, make the computer print the directory of drive A, by saying "dir a:".

To copy MARY from the hard drive to drive B, say "copy mary b:".

Suppose you’ve put MARY on a floppy disk in drive A and want to copy MARY from that floppy disk to a disk in drive B. Make the computer say "A:\>", then say "copy mary b:".

Suppose MARY’s on a floppy disk in drive A and you want to copy MARY to another floppy disk, but you don’t have a drive B. Even though you don’t have a drive B, you can say "copy mary b:". The computer will pretend your single floppy drive is both A and B; the computer will tell you when to remove disk A from the drive and insert disk B instead.

Copy to folder Suppose MARY is on a floppy disk in drive A, and your hard disk contains a folder called SARAH. Here’s how to copy MARY to the SARAH folder. At the standard C prompt, say "copy a:mary sarah", so your screen looks like this:

C:\>copy a:mary sarah

That tells the computer to copy drive A’s MARY to the SARAH folder. (When giving that command, do not put a space after the "a:".)

Here’s another way to copy drive A’s MARY file to the hard disk’s SARAH folder. First, get into the SARAH folder by saying "cd sarah". That makes the computer say:

C:\SARAH>

Then tell the computer to copy drive A’s MARY by saying "copy a:mary", so your screen looks like this:

C:\SARAH>copy a:mary

(When giving that command, do not put a space after the "a:".)

Many ways to copy Here’s a list of the many ways to copy a file.

Goal What to say

copy from the keyboard to a hard-disk file called MARY C:\>copy con mary

copy MARY from the hard disk to your screen C:\>copy mary con

copy MARY from the hard disk to drive A C:\>copy mary a:

copy MARY from the hard disk to drive B C:\>copy mary b:

copy MARY from drive A to drive B A:\>copy mary b:

copy MARY from drive A (to the hard disk) C:\>copy a:mary

copy MARY from drive A to the hard disk’s SARAH folder C:\>copy a:mary sarah or say C:\SARAH>copy a:mary

copy everything from drive A to the hard disk’s SARAH folder C:\>copy a:*.* sarah or say C:\SARAH>copy a:*.*

copy everything from the SARAH folder to drive A C:\>copy sarah a: or say C:\SARAH>copy *.* a:

copy MARY from the SARAH folder to drive A C:\>copy sarah\mary a: or say C:\SARAH>copy mary a:

copy everything from the SARAH folder to the TONY folder C:\>copy sarah tony or say C:\SARAH>copy *.* \tony

copy MARY from the SARAH folder to the TONY folder C:\>copy sarah\mary tony or say C:\SARAH>copy mary \tony

make a copy of MARY, but call the copy "SUE" C:\>copy mary sue

Copy entire floppy to another floppy Suppose drive A’s floppy disk contains important info, and you want to copy all that info to another disk.

If possible, use the "diskcopy" command, by saying "diskcopy a: b:" or "diskcopy a: a:". That makes an exact copy of the entire disk. Unfortunately, the "diskcopy" command can’t handle hard disks, and it requires that the target disk be exactly the same size and density as the source disk.

An alternative way to copy all files from drive A to drive B is to say:

A:\>copy *.* b:

That tells the computer to copy files from drive A to drive B. But that "copy" command does not copy the hidden files (IO.SYS and MSDOS.SYS), does not copy folders, and does not copy any files buried in folders. It copies just the visible simple files listed in the root directory. And before giving that "copy" command you must make sure drive B’s disk has been formatted.

Copy entire floppy to the hard disk To copy all files from drive A to the hard disk, you can use several methods.

One method is to make a hard-disk folder, such as SARAH, by saying:

C:\>md sarah

Then copy files from drive A to that folder by saying:

C:\>copy a:*.* sarah

That copies just the simple files that are visible in drive A’s root directory.

When giving that command, make sure you mention a hard-disk folder such as SARAH. Do not just say "copy a:*.*" without mentioning SARAH. If you make the mistake of saying just "copy a:*.*", the computer will copy drive A’s files to your hard directory’s root directory, where they’ll destroy any hard disk files that have similar names.

For example, if drive A contains a file called "AUTOEXEC.BAT" and you make the mistake of saying "copy a:*.*", that file will be copied to your hard disk’s root directory and destroy the AUTOEXEC.BAT file that was on your hard disk previously. Then your hard disk won’t work properly, and you’ll phone me with tears in your eyes about how you wrecked your hard disk.

Spare yourself the agony: remember to never say just "copy a:*.*". Instead, always mention a folder, such as "copy a:*.* sarah".

When you buy a program, you usually get an instruction manual and a set of floppy disks. Read the instruction manual — especially the part entitled "Getting started" or "Installation". It tells you the programmer’s opinion of the best way to copy the floppy disks onto your hard disk.

Instead of having you create a folder such as SARAH and then having you say "copy a:*.* sarah", the instruction manual usually tells you to put the first floppy disk into drive A and then type "a:install" or "a:setup". When you type that command, the computer starts running a program called "INSTALL.EXE" or "SETUP.EXE" on the first floppy disk. That program automatically creates a folder on your hard disk and copies files to that folder from the floppy disk. Then the program makes the computer tell you to insert the other floppy disks, and the program automatically copies files from those disks to your hard disk’s folder.

During that process, the program asks you questions about what kind of computer equipment you bought and what your desires are. The program copies just the files that are relevant to your needs and desires; it also edits those files to meet your needs more closely.

Type

Suppose you’ve put on your hard disk a file called MARY containing a poem. To see the poem on your screen, you can tell the computer to copy MARY to the console’s screen, by saying "copy mary con". An even easier way to copy MARY to the screen is to say just "type mary".

Experiment! See what’s in your hard disk’s "AUTOEXEC.BAT" file by saying "type autoexec.bat", like this:

C:\>type autoexec.bat

See what’s in your hard disk’s "CONFIG.SYS" file by saying:

C:\>type config.sys

Which files are ASCII MARY, AUTOEXEC.BAT, and CONFIG.SYS all contain words and numbers that you can read on the screen. Other files are weirder. For example, if you say "type command.com", you’ll see strange symbols instead of words and numbers.

Files such as MARY, AUTOEXEC.BAT, and CONFIG.SYS, which all contain words and numbers you can read, are called ASCII files (pronounced "ass key files"). The COMMAND.COM file contains special symbols and is therefore not an ASCII file.

If somebody says, "Give me an ASCII file", that person wants to be given a floppy disk that contains an ASCII file, which is a file that the person can read by giving the "type" command.

Files that end in .BAT are always ASCII files. Files ending in .COM and .EXE are never ASCII files. Files ending in .TXT are usually ASCII files.

Congratulations! You’ve learned all the essentials of DOS! If you’re in a rush, you may skip ahead to other chapters. If you keep reading here, you’ll become a DOS expert!

Rename (ren)

Suppose a file is named MARY. To change that file’s name to LAMBCHOP, say "rename mary lambchop".

Before giving that command, make sure the computer has given you the right prompt. For example, if MARY is on drive A, change the name to LAMBCHOP by saying:

A:\>rename mary lambchop

If MARY is in the hard drive’s SARAH folder, change the name MARY to LAMBCHOP by saying:

C:\SARAH>rename mary lambchop

Instead of typing the word "rename", you can type just "ren", like this: "ren mary lambchop".

By saying "rename" (or "ren"), you can rename a simple file (such as MARY), but you cannot rename a folder. For example, if you have a folder named SARAH, you cannot change SARAH to TONY by saying "rename".

Delete (del)

Suppose a file is named MARY. To delete that file from the disk, say "del mary".

Before giving that command, make sure the computer has given you the right prompt. For example, if MARY is on drive A, delete MARY by saying:

A:\>del mary

If MARY is in the hard drive’s SARAH folder, delete MARY by saying:

C:\SARAH>del mary

Delete all files To delete all files from the SARAH folder, say:

C:\>del sarah

The computer will ask, "Are you sure?" To reply, press the Y key (which means Yes) and then ENTER.

Then the computer will delete all files from the SARAH folder — except for Socrates (.), Freud (..), any hidden files, and any folders that are inside the SARAH folder.

To delete all files from drive A, say:

A:\>del *.*

When the computer asks "Are you sure?", press Y then ENTER. Then the computer will delete all files from drive A — except for hidden files and folders.

Move (in DOS 6 & up)

DOS 6, 6.2, and 95 let you say "move". The word "move" serves two purposes.…

Purpose 1: move a file For example, suppose MARY is a file on the hard disk, and you want to move MARY to drive A. Just say:

C:\>move mary a:

That copies MARY from the hard disk to drive A and then deletes MARY from the hard disk.

Saying "move mary a:" has the same effect as saying "copy mary a:" and then "del mary". So "move" means "make a copy and then destroy the original".

Purpose 2: rename a folder If SARAH is a folder and you want to change its name to TONY, say "move sarah tony", like this:

C:\>move sarah tony

 

Remove directory (rd)

Suppose your hard disk contains a folder named SARAH. Here’s how to remove that folder from the hard disk.

First, delete all files from the SARAH folder by saying:

C:\>del sarah

When the computer asks "Are you sure?", press the Y key and then ENTER.

Now the SARAH folder should be empty. Finally, get rid of the SARAH folder itself, by saying Remove the Directory SARAH:

C:\>rd sarah

If you’re lucky, the computer will respond by saying just:

C:\>

That means the SARAH folder has been removed. If you’re unlucky, the computer will gripe by saying:

Invalid path, not directory,

or directory not empty

C:\>

That means the SARAH folder can’t be removed yet, because the SARAH folder isn’t empty yet: it contains other folders or hidden files. Get rid of the folders inside it, then try again to say "rd sarah".

Deltree (in DOS 6 & up)

If you want to delete a folder named SARAH, you can use this shortcut in DOS 6, 6.2, and 95: just say "deltree sarah", like this.…

C:\>deltree sarah

The computer will ask whether you’re sure; press Y then ENTER. Then the computer will delete all the files in the SARAH folder, delete any folders in the SARAH folder, and remove the SARAH folder itself. So the computer automatically does "del sarah" and "rd sarah" and does the same for any folders in SARAH.

Saying "deltree sarah" is nifty, because it automatically makes the computer perform a series of "del" and "rd" commands for you.

The "deltree sarah" means "delete the tree of SARAH". It makes the computer delete the SARAH folder and also any files or folders that have been sprouting in SARAH.

Edit (in modern DOS)

To edit a file easily, give the "edit" command. To give that command, you must buy modern DOS.

(If you’re using a classic DOS instead, skip ahead to the next section, which explains how to give the "edlin" command instead.)

Before giving the "edit" command, decide which file you want to edit. (For example, suppose you want to edit a file you created called "MARY".)

Make the computer give you the correct prompt. (For example, if MARY is in your hard disk’s root directory, make the computer say "C:\>". If MARY is in your hard disk’s SARAH folder, make the computer say "C:\SARAH>". If MARY is in drive B, make the computer say "B:\>".)

After that prompt, say "edit mary".

If you’re lucky, the screen’s bottom line will say "MS-DOS Editor", the screen’s top line will say "File", and the screen’s second line will say "MARY". (If instead the computer gripes, make sure your DOS folder contains EDIT.COM, EDIT.HLP, and QBASIC.EXE.)

In the middle of the screen, you’ll see all of MARY’s lines:

Mary had a little lamb,

'Cause Jewish girls can't eat no ham.

If Mary were a Hindu now,

Mary couldn't eat no cow.

Religions all are fine and dandy,

Even my dentist's, which says "No candy!"

But Ma's religion makes me shiver.

That's why mine says "Ma, no liver!"

NUM LOCK key In your keyboard’s upper-right corner, you might see a light marked "Num Lock". If that light is glowing, turn it off by pressing the NUM LOCK key underneath it.

Cursor On your screen, the first character (the M) is underlined. The underline blinks. That blinking underline is called the cursor.

To move that cursor to the right, press the key that has a right-arrow on it. You can move the cursor in all four directions, by pressing the right-arrow, left-arrow, down-arrow, and up-arrow keys. Each of those keys automatically repeats: so to move the cursor to the right several characters, just keep your finger on the right-arrow key a while.

(If pressing the arrow keys makes you see numbers instead of a moving cursor, press the NUM LOCK key.)

To move the cursor all the way left, to the line’s beginning, press the HOME key. To move the cursor far right, to the line’s end, just past the line’s last word, press the END key.

Insert a character Here’s how to insert extra characters anywhere in your document. Move the cursor to where you want the extra characters to begin. Then type the characters you want to insert. To make room for characters you’re inserting, other characters on that line will automatically move to the right.

Insert a line To insert an extra line in your document, move the cursor to the screen’s left edge, where you want the extra line to begin.

Press the ENTER key. You’ll see a blank line. To make room for it, other lines automatically moved down.

Leave the new line blank, or type there whatever characters you wish!

Delete a character To delete the character you just typed, press the BACKSPACE key (which is above the ENTER key and has a left-arrow on it).

To delete a character you typed long ago, move the cursor to that character, then press the DELETE key (which says "Delete" or "Del" on it). To delete a passage typed long ago, move the cursor to the passage’s beginning, then tap the DELETE key several times (or hold down the DELETE key a while), until the passage disappears.

Delete a line To delete an entire line, put the cursor anywhere in that line. Then, while holding down the Ctrl key, tap the Y key (which means "Yank the line"). The entire line will disappear.

Use that same technique to eliminate a blank line: put the cursor at the blank line, then press Ctrl with Y.

Move a line To move a line far up or far down, first delete the line from its old position (by moving the cursor to that line, then pressing Ctrl with Y), so the line temporarily disappears.

Where do you want to move the line? Put the cursor at the screen’s left edge, just under where you want the line to reappear.

Then do this: while holding down the SHIFT key, tap the INSERT key. The line will magically reappear there! To make room for it, other lines will automatically move down.

Exit When you finish editing the file, tap 4 keys:

Tap the Alt key (which means "Menu").

Tap the F key (which means "File").

Tap the X key (which means "eXit").

Tap the ENTER key (which means "Yes").

That makes the computer exit from the editor. You see a DOS prompt (such as "C:\>"), so you can give another DOS command.

Make a big boo-boo? If you make a big mistake and wish you hadn’t tried to edit MARY, tap 4 keys:

Tap the Alt key (which means "Menu").

Tap the F key (which means "File").

Tap the X key (which means "eXit").

Tap the N key (which means "No").

That makes the computer ignore all the editing you’ve done, so that MARY returns to its original state. MARY returns to the state it was in before you started using the editor.

You see a DOS prompt (such as "C:\>"), so you can give another DOS command.

Edlin (in early DOS versions)

If your DOS is classic, edit a file by giving the "edlin" command. (If your DOS is modern, don’t bother reading this; skip ahead to the next topic, "Batch Files".)

Here’s how to give the "edlin" command.

First, decide which file you want to edit. (For example, suppose you want to edit a file you created called "MARY".)

Next, make the computer give you the correct prompt. (For example, if MARY is in your hard disk’s root directory, make the computer say "C:\>". If MARY is in your hard disk’s SARAH folder, make the computer say "C:\SARAH>". If MARY is in drive B, make the computer say "B:\>".)

After that prompt, say "edlin mary".

If you’re lucky, the computer will say:

End of input file

(If instead the computer says "Bad command or file name", your computer is set up incorrectly and can’t find the EDLIN.COM program. In that case, remind the computer where the EDLIN.COM program is. For example, if the EDLIN.COM program is in your hard disk’s DOS folder, say "c:\dos\edlin mary". If the EDLIN.COM program is in drive A, say "a:edlin mary".)

Then the computer will print an asterisk:

*

After the asterisk, you can type any edlin command.

List For your first edlin command, type "lL" after the asterisk, so your screen looks like this:

*1L

That makes the computer print a List of MARY’s lines, starting at line 1. The computer automatically numbers the lines, so you see this:

1:*Mary had a little lamb,

2: 'Cause Jewish girls can't eat no ham.

3: If Mary were a Hindu now,

4: Mary couldn't eat no cow.

5: Religions all are fine and dandy,

6: Even my dentist's, which says "No candy!"

7: But Ma's religion makes me shiver.

8: That's why mine says "Ma, no liver!"

Underneath, the computer prints another asterisk, so you can give another edlin command.

Edit If you want to edit line 5, type "5" (and then press ENTER).

The computer will print a copy of line 5, so you see this:

5:*Religions all are fine and dandy,

Underneath, retype that line however you want it. For example, try typing "Religions can be wonderful and fancy,". To save time, instead of retyping the word "Religions" (which is unchanged), just press the right-arrow key 9 times (since "Religions" has 9 characters).

When you finish retyping the line, press ENTER at the end of it.

Delete If you want to Delete line 6, type "6D" after the asterisk. That makes the computer delete line 6 and renumber all the lines that came underneath it.

Then look at the new version of MARY, by typing "1L" again.

Insert Here’s how to insert extra lines and make them become lines 3 and 4, so that the old lines 3 and 4 become 5 and 6.

Type "3I" after the asterisk. The computer will say:

3:*

Then type whatever words you want to be in the new line 3.

When you press the ENTER key at the end of that line, the computer will say:

4:*

Then type whatever words you want to be in the new line 4.

When you press the ENTER key at the end of that line, the computer will say:

5:*

If you don’t want to type a new line 5, say Cancel, by tapping the C key while holding down the Ctrl key.

Then look at the new version of MARY, by typing 1L again.

Exit When you finish editing MARY, type "E" after the asterisk. That makes the computer End the editing and Exit from edlin. You see a DOS prompt (such as "C:\>"), so you can give another DOS command.

When exiting from edlin, the computer puts two versions of MARY onto the disk. The new, edited version is named "MARY". The previous version is on the disk also, but its name has been changed to "MARY.BAK".

Make a big boo-boo? If you make a big mistake and wish you hadn’t tried to edit MARY, type "Q" after the asterisk. That tells the computer to Quit.

The computer asks "Abort edit?" Press Y and then ENTER.

That makes the computer ignore all the editing you’ve done, so that MARY returns to its original state. MARY returns to the state it was in before you started using edlin.

You see a DOS prompt (such as "C:\>"), so you can give another DOS command.

Optional capitals When giving an edlin command, you do not have to capitalize. For example, to delete line 6 you can type "6d" instead of "6D".

Batch files

You can invent your own command and make it stand for a list of other commands.

For example, let’s invent a command called "status" that makes the computer display a wide directory and also remind you of which DOS version you’re using. To invent that "status" command, just create a file called "STATUS.BAT", which contains two lines, "dir /w" and "ver".

To create that STATUS.BAT file, type this —

C:\>copy con status.bat

dir /w

ver

then press the F6 key and then the ENTER key.

Afterwards, whenever you type the word "status", like this —

C:\>status

the computer will look at the file "STATUS.BAT" and obey the commands you stored there: the computer will automatically do "dir /w" and then "ver".

A file that’s a list of commands is called a batch file. The file "STATUS.BAT" is a batch file, because it’s a list of two commands ("dir /w" and "ver"). The name of every batch file must end in ".BAT", which stands for "batch".

Echo off

While the computer performs a batch file, the computer prints little messages reminding you of what it’s doing. For example, while the computer performs the "ver" command in "STATUS.BAT", the computer prints the word "ver" on your screen. Each such message is called an echo.

If you don’t want to see such messages, say "echo off" at the beginning of your batch file, like this:

A>copy con status.bat

echo off

dir /w

ver

Clear screen (cls)

Another command you can put at the beginning of your batch file is "cls". That makes the computer begin by erasing the screen, so you don’t see any distractions.

Put "cls" just under "echo off", so that the computer even erases the words "echo off" from the screen. Here’s what the batch file looks like now:

C:\>copy con status.bat

echo off

cls

dir /w

ver

Echo

Let’s define "chick", so that if you say —

C:\>chick

the computer will recite this chicken riddle:

Why did the chicken cross the road?

To escape from Colonel Sanders!

To define "chick", type this —

C:\>copy con chick.bat

echo off

cls

echo Why did the chicken cross the road?

echo To escape from Colonel Sanders!

then press F6 and ENTER.

Replaceable parameter (%1)

You can define "greet", so that if you say —

C:\>greet Peter

the computer will say:

What will Peter do today?

Will Peter work, or will Peter play?

Peter needs a holiday.

Welcome, Peter! Hip, hip, hooray!

If you say —

C:\>greet Suzie

the computer will say:

What will Suzie do today?

Will Suzie work, or will Suzie play?

Suzie needs a holiday.

Welcome, Suzie! Hip, hip, hooray!

If you say —

C:\>greet Godzilla

the computer will say:

What will Godzilla do today?

Will Godzilla work, or will Godzilla play?

Godzilla needs a holiday.

Welcome, Godzilla! Hip, hip, hooray!

To define "greet", type this —

C:\>copy con greet.bat

echo off

cls

echo What will %1 do today?

echo Will %1 work, or will %1 play?

echo %1 needs a holiday.

echo Welcome, %1! Hip, hip, hooray!

then press F6 and ENTER. Make sure you type the "%1" in that batch file.

Afterwards, when you say "greet Peter" or "greet Suzie" or "greet Godzilla", the computer will print a greeting to Peter or Suzie or Godzilla, by automatically substituting the person’s name for "%1". Try it!

@Echo off (in DOS 3.3 & up)

So far, you’ve learned two sophisticated ways to begin a batch file.

One way is to begin by saying:

echo off

That prevents the computer from printing echo messages. Unfortunately, that method still leaves the words "echo off" on your screen.

The second way is to begin by saying:

echo off

cls

That flashes the words "echo off" on your screen, then immediately erases those words (because "cls" erases the screen). Unfortunately, "cls" erases all previous commands from the screen also; that prevents you from browsing at the screen to see what you had done previously.

The most sophisticated way to begin a batch file is to begin by saying:

@echo off

without saying "cls". (To type the symbol "@", tap the 2 key while holding down the SHIFT key.) The symbol "@" prevents the words "echo off" from appearing on your screen but still lets you see all previous screen activity.

The "@echo off" command is understood just by DOS 3.3, DOS 4, and modern DOS.

Boot

When you turn the computer on, it goes through a procedure called booting. Here’s what the computer does while it’s booting.

POST

First, the computer plays doctor and gives itself a checkup, to make sure all its innards are working okay. That’s called the power-on self test (POST).

Code numbers If the IBM PC detects an illness, it prints a code number telling you where the illness is:

Code number Which part of the computer is ill

0 main power supply (or other fundamentals)

1 motherboard (or the battery for the date & time)

2 RAM chips

3 keyboard

4 monochrome monitor (or its video card)

5 CGA color monitor (or its video card)

6 floppy disk (or its drive or controller)

7 math coprocessor chip (8087 or 80287 chip)

9 LPT1 parallel port (to attach the printer to)

11 COM1 serial port (to attach a modem or mouse)

12 COM2 serial port (to attach a modem or mouse)

13 joystick (or other device attached to game port)

14 printer

17 hard disk (or its drive or controller)

24 EGA color monitor (or its video card)

After printing the code number, it prints a two-digit number, which is usually 01. For example, the computer usually prints 301 if the keyboard is broken (or not plugged into the system unit, or plugged in loosely, or has an XT-AT switch in the wrong position). The computer usually prints 1701 if the hard disk is broken (or the hard disk’s controller is broken or the hard disk’s cable to the controller is loose).

Although the IBM PC prints those code numbers, modern clones print English words instead. For example, if a modern clone detects that the keyboard is broken, the clone says "Keyboard error" or "Keyboard failure" or "No scancode from keyboard" or some similar message.

Experiment! Turn off your computer, unplug its keyboard, turn the computer back on, and see how your computer gripes! (Then turn the computer off again, and plug the keyboard back in.)

RAM test To test the RAM chips, the computer puts data into them, then reads the chips to see if the data remains.

During that process, the typical computer will tell you how much RAM you have. For example, if you have 640K of RAM, the screen will show the computer counting up to 640K.

If your computer is old-fashioned, you’ll see it count up to 640K twice. The first time it counts to 640K, it puts data into the RAM chips; the second time it counts to 640K, it reads the chips to see whether the data’s still there. For that kind of computer, if you trust the RAM chips and don’t want to wait for the computer to test them, press the SPACE bar in the middle of the test. That interrupts the RAM test and makes the computer move on to the next activity.

During the RAM test, the original IBM PC shows no numbers on the screen at all. That computer leaves you in the dark until the RAM test is done.

 

Beeps At the end of the entire POST testing, the computer gives a short beep, which tells you the testing’s done.

If you ever hear a long beep, or a series of several beeps, the computer’s trying to send you an alarm. Look at the messages on the screen for details! If you hear the alarm but don’t see any messages on the screen, the cause is usually a faulty electrical current: the power cord (that goes from the computer to the wall) is loose, or your town’s electric company isn’t generating enough volts, or an appliance in your building (such as an electric heater or refrigerator) is stealing too much electricity, or the power supply inside your computer is bad, or your motherboard is very defective.

If you hear the short beep that means the POST test is done, and you don’t hear any alarms, but your screen is totally dark, the problem is probably just your screen. Make sure the screen is turned on (so its power light glows); make sure the screen’s contrast and brightness knobs are turned up; make sure the cable that runs from the screen to the computer is plugged in tight; and make sure one of your colleagues didn’t attach the wrong screen to the wrong computer!

Boot drive

After finishing the power-on self test, the computer decides which disk drive will be the boot drive.

To decide, the computer begins by checking whether drive A contains a formatted disk. If it does contain a formatted disk, it becomes the boot drive (so that later the computer will eventually print "A>" or "A:\>" on your screen).

If drive A does not contain a formatted disk (or the drive’s door is accidentally open), the computer looks for drive C. If the computer finds drive C (because you bought a hard disk and formatted the main part of it), drive C becomes the boot drive (so that later the computer will eventually print "C>" or "C:\>" on your screen).

If drive A doesn’t contain a formatted disk but you don’t have a drive C either, here’s what happens. If your computer’s built by IBM, the computer prints "IBM Personal Computer BASIC" on your screen and lets you write programs in BASIC. If your computer’s a clone instead, it waits for you to insert a formatted disk into drive A.

Hidden system files

Next, the computer searches in the boot drive’s root directory for two hidden system files.

MS-DOS calls them "IO.SYS" and "MSDOS.SYS". PC-DOS calls them "IBMIO.COM" and "IBMDOS.COM".

No system files? If the computer doesn’t find the hidden system files, the computer gripes:

Non-System disk or disk error

Replace and press any key to continue

To reply, put in drive A a disk containing those files (or make drive A be empty and hope that drive C contains those files). Then press ENTER. Again the computer will choose a boot drive and search for hidden system files.

CONFIG.SYS

Next, the computer looks in the boot drive’s root directory for a file called "CONFIG.SYS". It tells the computer how to manage hardware intelligently — how to CONFIGure your SYStem. If the computer does not find CONFIG.SYS, the computer does not gripe; instead, the computer just manages hardware stupidly.

The CONFIG.SYS file consists of a list of equations.

For DOS 3.3, CONFIG.SYS should usually be this list of equations:

stacks=0,0

buffers=15

files=30

For DOS 6.2, CONFIG.SYS should usually be this list —

device=dos\himem.sys /testmem:off

device=dos\emm386.exe ram d=64

dos=high,umb

stacks=0,0

buffers=40

files=50

devicehigh=mtmcdas.sys /d:mscd000 /p:320

except that you must modify the bottom equation to match the kind of CD-ROM drive you have.

For DOS 95, CONFIG.SYS should usually be this list:

device=windows\himem.sys /testmem:off

device=windows\emm386.exe ram d=64

dos=high,umb

That’s what CONFIG.SYS should look like on typical computers — but your computer might not be typical! To find out what CONFIG.SYS is on your computer, say:

C:\>type config.sys

Let’s examine those equations more closely.…

HIMEM.SYS On many computers, CONFIG.SYS’s top equation says:

device=dos\himem.sys /testmem:off

That equation makes the computer to look in your DOS folder for a program called HIMEM.SYS and run that program. The HIMEM.SYS program teaches the computer how to manage the high memory, which is also called extended RAM; it’s the RAM beyond the first megabyte.

At the end of that equation, the "/testmem:off" says to skip a second test of that memory (since testing the memory once is enough).

What’s the best way to write the HIMEM.SYS equation? That depends on which DOS you have:

DOS version What to say

95 device=windows\himem.sys /testmem:off

6.2 device=dos\himem.sys /testmem:off

6 device=dos\himem.sys

5, with Windows device=windows\himem.sys

5, without Windows device=dos\himem.sys

before 5, with Windows device=windows\himem.sys

before 5, without Windows omit the equation

Omit the equation if your computer is so primitive that it has less than 1M of RAM or its CPU is slower than a 286.

Here’s why:

The HIMEM.SYS program comes with modern DOS and with Windows. If you have neither modern DOS nor Windows, you can’t use HIMEM.SYS.

Since HIMEM.SYS’s purpose is to manipulate RAM beyond the first megabyte, omit HIMEM.SYS equation if you have just 1 megabyte. If your CPU is an 8088 or 8086, it can’t handle extended memory, and therefore can’t use HIMEM.SYS, so omit the HIMEM.SYS equation.

Modern DOS’s HIMEM.SYS is usually in the DOS directory (so say "dos\himem.sys"); but if you’re using Windows 95 or if your version of Windows is much newer than your version of DOS, say "windows\himem.sys" instead.

The DOS 6.2 and 95 versions of HIMEM.SYS retest the RAM unless you say "/testmem:off".

A program that teaches the computer how to manage extra hardware is called a device driver. For example, HIMEM.SYS is a device driver. To use a device driver easily, mention it in a CONFIG.SYS equation that begins by saying "device=".

EMM386.EXE On many computers, CONFIG.SYS’s second equation says:

device=dos\emm386.exe ram d=64

That equation tells the computer to run a device driver, in your DOS folder, called EMM386.EXE. That device driver manages upper memory and also turns some extended RAM into expanded RAM (which is the kind of RAM required by old-fashioned programs). That program is called EMM386.EXE because it’s an Expanded Memory Manager that runs on any computer whose CPU is at least a 386. It runs if your CPU is a 386, 486, or Pentium.

What’s the best way to write the EMM386.EXE equation? That depends on which DOS you have:

DOS version What to say

95 device=windows\emm386.exe ram d=64

6 or 6.2, with sound card device=dos\emm386.exe ram d=64

6 or 6.2, without sound card device=dos\emm386.exe ram

5, with Windows device=windows\emm386.exe 256 ram

5, without Windows device=dos\emm386.exe 256 ram

before 5, with Windows device=windows\emm386.exe 256 ram

before 5, without Windows omit the equation

Omit the equation if your computer is so primitive that its CPU is slower than a 386.

Here’s why:

The EMM386.EXE program comes with modern DOS and with Windows. It works just if your CPU is at least a 386 and your CONFIG.SYS file contains a HIMEM.SYS equation. You must use a version of EMM386.EXE that’s compatible with HIMEM.SYS: if you said "dos\himem.sys", you must say "dos\emm386.exe"; if you said "windows\himem.sys", you must say "windows\emm386.exe". The EMM386.EXE program reserves at most 32K of RAM for direct memory access (DMA), unless you say "d=64", which reserves 64K instead; so say "d=64" if you have a sound card (or any other device requiring more than 32K of DMA).

Windows programs use extended RAM. Big, old DOS programs (such as the DOS versions of Word Perfect, Lotus 1-2-3, and Flight Simulator) use expanded RAM instead.

If your version of EMM386.EXE is new (version 6 or 6.2 or 95), it automatically figures out how much expanded RAM is best for each program.

If your version of EMM386.EXE is old (version 5 or earlier), you must tell the computer how much expanded RAM to create, by mentioning a number such as 256 (which tells the computer to create 256K of expanded RAM). In the chart above, the lines saying "256 ram" tell the computer to turn 256K of extended RAM into expanded RAM, to help big, old DOS programs run. If you’re not using any big, old DOS programs, omit the "256 ram" and say "noems" instead (which tells the computer you want "NO Expanded Memory System"). If you’re using mainly big, old DOS programs wanting expanded memory, you can make those programs run better by picking a bigger number such as "512 ram" or "1024 ram" or even "2048 ram"; but if you make the number too big, your other programs (such as Windows programs) will run worse, and the computer might also complain you don’t have enough RAM to accomplish your goals.

DOS On many computers, CONFIG.SYS’s third equation says:

dos=high,umb

That equation moves some software out of the base RAM and puts that software elsewhere instead, so the base RAM has more space left for other programs. That equation is an abbreviation for this pair of equations:

Equation Meaning

dos=high move buffers & part of DOS to the high memory area

dos=umb move utility programs to the upper memory area

What’s the best way to write the "dos=" line? That depends on which DOS you have:

DOS version What to say

95 dos=high,umb

5, 6, or 6.2, with at least a 386 CPU dos=high,umb

5, 6, or 6.2, with a 286 CPU and at least 1M dos=high

5, 6, or 6.2, with less than a 286 or less than 1M omit the equation

before 5 omit the equation

Here’s why:

The computer understands "dos=" just if your DOS is modern and CONFIG.SYS contains a HIMEM.SYS equation. The computer understands "umb" just if CONFIG.SYS contains an EMM386.EXE equation.

Stacks In DOS 3.3, 4, 5, 6, and 6.2, CONFIG.SYS’s fourth equation should say:

stacks=0,0

That tells the computer that your software takes care of interruptions well, so there are no stacks of unexplained interrupts, and the computer doesn’t need to reserve any RAM for them.

Some dealers make the mistake of saying "stacks=9,256" instead. That forces the computer to build 9 stacks of 256K bytes. Those stacks will probably never be used: they just waste RAM! I’ve never seen a computer where saying "stacks=9,256" is helpful. Say "stacks=0,0" instead.

In DOS 95, saying "stacks=0,0" doesn’t make much difference, so you just omit that line altogether. In DOS 3.2 and earlier, omit the stacks equation, since those earlier DOS’s don’t understand stacks.

Buffers On many computers, CONFIG.SYS’s next equation says:

buffers=40

That makes the computer reserve enough RAM to hold copies of 40 of the disk’s sectors. That speeds up the computer since the computer can look at those RAM copies faster than waiting for the disk to spin to the correct sector.

Each buffer consumes ½K of RAM. The 40 buffers therefore consume 20K of RAM.

If your DOS is classic, or your RAM is smaller than 1M, or you’re using a program called SMARTDRV (which I don’t recommend), you can’t afford to devote 20K of RAM to buffers, so ask for fewer than 40 buffers: say "buffers=15".

If your DOS is 95, omit the buffers equation. DOS 95 automatically gives you 30 buffers, which is the right quantity for DOS 95.

Files On many computers, CONFIG.SYS’s next equation says:

files=50

That makes the computer reserve enough RAM to hold 50 filenames, so the computer can manipulate 50 files simultaneously.

Most programs manipulate just a few files simultaneously. For those programs, saying "files=30" is fine. But some programs try to manipulate more than 30 files simultaneously and require you to say "files=50" or even "files=60" or even "files=99".

If you wish, start by saying "files=30" and then see whether any of your fancy programs complain; if they complain, switch to a higher number.

If your DOS is fancy, your programs are probably fancy too, so you’ll want to manipulate more files simultaneously. Here’s a good rule of thumb:

For DOS 5, 6, or 6.2, say "files=50".

For any earlier DOS, say "files=30" (to consume less RAM).

For DOS 95, omit the equation. (DOS 95 automatically gives you 60 files.)

CD-ROM DOS 95 automatically teaches the computer how to use a CD-ROM drive.

If you have a CD-ROM drive but your DOS is not 95, give an equation that teaches the computer how to use a CD-ROM drive. The equation begins by saying "devicehigh=" and mentions a CD-ROM driver.

If the CD-ROM drive is manufactured by Toshiba,

its driver program is usually called TOSHIBA.SYS.

The equation looks like this: "devicehigh=toshiba.sys /d:mscd000".

If the CD-ROM drive is manufactured by Sony,

its driver program is usually called SLCD.SYS.

The equation looks like this: "devicehigh=slcd.sys /d:mscd000 /b:300 /m:p".

If the CD-ROM drive is manufactured by Mitsumi,

its driver program is usually called MTMCDAS.SYS.

The equation looks like this: "devicehigh=mtmcdas.sys /d:mscd000 /p:320".

On your computer, the equation might be slightly different, to make your particular CD-ROM drive be compatible with your computer. If your CD-ROM drive works fine, so does your CONFIG.SYS’s CD-ROM equation: leave it the way your manufacturer gave it to you!

Notice that the equation should say "devicehigh=" instead of "device=". The "high" makes the computer put the driver program into upper memory instead of base RAM, so the base RAM is free for other purposes.

Your own CONFIG.SYS If your drive C’s root directory doesn’t contain a CONFIG.SYS file yet, create one! For example, you can create a CONFIG.SYS file for DOS 6.2 by typing this —

C:\>copy con config.sys

device=dos\himem.sys /testmem:off

device=dos\emm386.exe ram d=64

dos=high,umb

stacks=0,0

buffers=40

files=50

devicehigh=mtmcdas.sys /d:mscd000 /p:320

and then pressing the F6 key and then ENTER. But remember that you must modify those equations to handle your computer’s peculiarities, as I suggested when I explained each equation.

If your drive C’s root directory contains a CONFIG.SYS file already, you can edit it by saying "edit config.sys" (in modern DOS) or "edlin config.sys" (in classic DOS). But before you perform surgery on your CONFIG.SYS file, copy it onto a floppy disk (by saying "copy config.sys a:"), so that if you make a mistake you can return to what you had before.

The computer examines the CONFIG.SYS equations just when the computer is booting. If you edit CONFIG.SYS or create a new CONFIG.SYS, the computer won’t obey the new CONFIG.SYS equations until the next time you boot the computer.

If your dealer or colleague has put many strange lines into your CONFIG.SYS file, do not erase them until you find out why they’re there. Most of those lines are probably time-wasting junk put there by bloated Microsoft DOS installation routines and should be erased, but some of those lines might be essential. Be especially cautious about erasing any lines saying "device=" or "devicehigh=".

When in doubt, leave your CONFIG.SYS alone. Better safe than sorry! Follow the advice of the world’s best repairman: "If it ain’t broke, don’t fix it."

Hints If you’re ambitious and try to "improve" a CONFIG.SYS file, here are some hints.

Say "devicehigh" instead of "device", except for the lines about HIMEM.SYS and EMM386. For "devicehigh" to work, CONFIG.SYS must mention "umb".

When you switch to a newer version of DOS, some old software might gripe about the switch and say "incorrect DOS version". To stop the gripe, buy newer software or add this equation to the bottom of CONFIG.SYS:

Your new DOS version What to say

95 devicehigh=windows\setver.exe

5, 6, or 6.2 devicehigh=dos\setver.exe

That equation makes your new DOS pretend to be an older version, so your old commands still work.

Most computers have a drive A (which is the main floppy drive), maybe a drive B (an extra floppy drive), a drive C (the main hard drive), and maybe drives D & E. The computer assumes the last drive is E or earlier. To force the computer to accept a drive F, say "lastdrive=f". To force the computer to accept drives F and G, say "lastdrive=g". To force the computer to accept drives F, G, and H, say "lastdrive=h". To force the computer to accept all drive letters (up through Z), say "lastdrive=z". If you don’t need any drive letters past E, you can save some RAM by removing any "lastdrive" equation.

If CONFIG.SYS contains equations mentioning "smartdrv" or "fastopen", their purpose is to help the computer get information from the disk faster; but if you have an IDE drive (or any other drive with a built-in disk cache), your drive is fast enough already! You should usually remove any mention of "fastopen" (which conflicts with commands such as "defrag") and "smartdrv" (which consumes too much RAM, can conflict with telecommunications programs, and can cause inconsistent writing to the disk).

To avoid conflicts, the letters "emm" must appear in CONFIG.SYS just once. For example, if your CONFIG.SYS mentions "emm386.exe", it must not mention "emm386.sys" or anything about "qemm" or "nemm".

You can remove any equation about "fcbs", since its only purpose is to help run ancient programs that nobody uses anymore anyway. Even if you remove the fcbs equation, the computer will automatically do "fcbs=4" anyway, which lets the computer simultaneously use 4 file control blocks (FCBs).

Remove any equation saying "break=on", since that equation slows your computer down. The purpose of "break=on" is to let you interrupt the computer more easily; but once you learn how to control the computer correctly, you won’t want to interrupt it anyway!

If you remove an equation saying "shell", you must copy COMMAND.COM from the DOS folder to the root directory by saying —

C:\>copy dos\command.com

and if you’re using DOS version 4 (or 4.01) you must also say:

C:\>copy dos\share.exe

If your computer’s a Leading Edge Model D, make sure CONFIG.SYS contains an equation saying "device=clkdvr.sys" and the root directory contains Leading Edge’s CLKDVR.SYS program, which teaches your computer how to give the correct date and time.

For free help, phone me anytime at 617-666-2666.

COMMAND.COM

After the computer deals with the issue of CONFIG.SYS, the computer looks in the boot drive for a program called "COMMAND.COM". (The computer looks in the root directory, unless CONFIG.SYS contained a "shell=" equation telling the computer to look in the DOS folder instead.)

If the computer doesn’t find COMMAND.COM, the computer gripes:

Bad or missing Command Interpreter

If the computer does find COMMAND.COM, the computer runs the COMMAND.COM program, which teaches the computer how to react to internal commands (such as ver, echo, cls, date, time, dir, cd, md, copy, type, rename, ren, del, and rd).

AUTOEXEC.BAT

Next, the computer looks in the boot drive’s root directory for a batch file called "AUTOEXEC.BAT". The computer AUTOmatically EXECutes any commands in that file.

For DOS 3.3, AUTOEXEC.BAT should usually be this list of commands:

@echo off

prompt $p$g

For DOS 6.2, AUTOEXEC.BAT should look like this —

@echo off

path c:\dos;c:\windows

set temp=c:\temp

set blaster=a220 i7 d1 t4

set sound=c:\sgnxpro

Lh mouse

Lh doskey

Lh mscdex /d:mscd000 /m:12 /e

Lh mode LPT1 retry=b >nul

but you should modify the commands about "set blaster" and "set sound" to match your sound card, include "Lh mscdex" command just if you have a CD-ROM drive, and include the "Lh mode" command just if your printer is an ink-jet or a slow laser.

For DOS 95, you don’t need an AUTOEXEC.BAT file at all; but if you have one, make it this list:

@echo off

path c:\windows;c:\windows\command

That’s what AUTOEXEC.BAT should look like on typical computers — but your computer might not be typical! To find out what AUTOEXEC.BAT is on your computer, say:

C:\>type autoexec.bat

Let’s examine those commands more closely.…

Echo On most computers, AUTOEXEC.BAT’s top command should say:

@echo off

That command prevents the computer from printing excessive messages on the screen. (To type the symbol "@", tap the 2 key while holding down the SHIFT key.)

If your DOS is earlier than version 3.3, you must omit the symbol "@" and say just:

echo off

Prompt On many computers, AUTOEXEC.BAT’s second command should say:

prompt $p$g

That command tells the computer how to make the DOS prompts look, so that when you’re in drive C’s SARAH folder the computer will say "C:\SARAH>" instead of just "C>".

If your DOS is earlier than 6 and you forget to say "prompt $p$g", the computer will say just "C>" instead of "C:\SARAH>", even when you’re in the SARAH folder.

DOS 6, 6.2, and 95 are smarter: even if you don’t say "prompt $p$g", they assume you meant to say "prompt $p$g". So if you’re using DOS 6, 6.2, or 95, you don’t need to say "prompt $p$g".

Path On many computers, AUTOEXEC.BAT’s next command says:

path c:\dos;c:\windows

That command tells the computer to hunt in the DOS and WINDOWS folders whenever you give a command whose definition the computer can’t find elsewhere.

Use that command just if drive C has folders called "DOS" and "WINDOWS". If drive C has a DOS folder but no WINDOWS folder, say just:

path c:\dos

If you’re using DOS 95 (which is part of Windows 95), say this instead:

path c:\windows;c:\windows\command

If you forget to give a path command, and you’re booting from drive C, DOS 6 & 6.2 assume you meant to say "path c:\dos"; DOS 95 assumes you meant to say "path c:\windows;c:\windows\command". Earlier DOS versions make no assumptions; they create no path for you.

Set temp On many computers, AUTOEXEC.BAT’s next command says:

set temp=c:\temp

Here’s what that command means: whenever the computer needs to create a temporary file (which holds data temporarily and then self-destructs), the computer should put that file into the TEMP folder (instead of into the root directory or a different folder). That command works just you created a TEMP folder by giving this command sometime after buying the computer:

C:\>md temp

If you’re using DOS 95, omit the "set temp" line. DOS 95 automatically does "set temp=c:\windows\temp", which puts temporary files into a TEMP folder that’s inside the WINDOWS folder.

Set blaster On many computers, AUTOEXEC.BAT’s next command says:

set blaster=a220 i7 d1 t4

That command helps a sound card work properly, if the sound card resembles the Soundblaster.

Omit that command if you lack a sound card, or your sound card isn’t Soundblaster-compatible, or you’re using DOS 95 (which handles sound cards automatically).

Set sound On many computers, the next command resembles this:

set sound=c:\sgnxpro

That command says the files about sound are in a folder called SGNXPRO.

If the files about sound are in a different folder instead, mention the correct folder. For example, if your sound folder is called AUDIO16 instead of SGNXPRO, say:

set sound=c:\audio16

Omit the entire "set sound" command if you lack a sound card or you’re using DOS 95 (which handles sound cards automatically).

 

Lh mouse On many computers, the next command says:

Lh mouse

That command makes the computer run a program called MOUSE.COM (or MOUSE.EXE), which is a device driver that teaches the computer how to react when you move the mouse and click the mouse’s buttons.

Omit that command if you lack a mouse or you’re using DOS 95 (which handles the mouse automatically).

The "Lh" tells the computer to "load high" the mouse program, so the computer copies the mouse program into upper memory. (The computer doesn’t care whether you capitalize the L.)

The MOUSE.COM (or MOUSE.EXE) program is not usually included in the price of DOS; instead, you get the MOUSE.COM (or MOUSE.EXE) program on a floppy disk from the company that manufactured your mouse or computer, and you must copy that program onto your hard disk.

The "Lh mouse" command works just if the MOUSE.COM program is in your root directory or DOS folder. If MOUSE.COM is in a different folder, remind the computer which folder MOUSE.COM is in. For example, if MOUSE.COM is in a folder called MOUSEY, say:

Lh mousey\mouse

If MOUSE.COM is in a folder called MICKEY, say:

Lh mickey\mouse

If MOUSE.COM is in a folder called MOUSE, say:

Lh mouse\mouse

If your CONFIG.SYS file mentioned "mouse" already, don’t put any mouse command in your AUTOEXEC.BAT file.

Omit the "Lh" part of the command if your CONFIG.SYS file lacks any mention of "umb".

Doskey On many computers, the next command says:

Lh doskey

That command makes the computer run the DOSKEY.COM program. That program modifies DOS so that when you’re typing a DOS command, you can edit the command easily by pressing these keys:

Pressing the left-arrow key moves the cursor left without erasing characters. Pressing the right-arrow key moves the cursor to the right.

Pressing the DELETE key deletes a character.

Pressing the INSERT key lets you type extra characters to insert.

Pressing the up-arrow key repeats the previous DOS command you typed.

Use that command just if your DOS is modern. Omit the "Lh" part of the command if your CONFIG.SYS file lacks "umb".

The command is useful just if you often type DOS commands and edit them. If you rarely type any DOS commands (because you mainly use Windows or menus instead), omit this command. If you’re using DOS 95 (which is part of Windows 95), you’ll probably want to omit this command, since it’s less useful than Windows 95 commands and steals too much RAM from DOS 95.

Mscdex On many computers, the next command says:

Lh mscdex /d:mscd000 /m:12 /e

That command makes the computer run the MicroSoft CD EXtension, which is a program that teaches the computer how to control your CD-ROM drive.

Omit that command if you lack a CD-ROM drive or you’re using DOS 95 (which handles CD-ROM drives automatically).

That command is part of DOS 6 & 6.2.

In the mscdex command, the "/m:12" says to reserve enough RAM to hold copies of 12 sectors from the CD-ROM. In other words, it creates 12 buffers.

The "/e" says to put those buffers in expanded RAM (instead of in base RAM). The "/e" works just if your computer has expanded RAM, so say "/e" just if your CONFIG.SYS file’s EMM386.EXE line says "ram". Omit the "/e" if your CONFIG.SYS file’s EMM386.EXE line says "noems" instead.

The "/d:mscd000" says the CD-ROM drive is named mscd000. Instead of "mscd000", you can invent any other name you wish. Put the name in this command and also in CONFIG.SYS’s CD-ROM equation.

Mode On many computers, the bottom command says:

Lh mode LPT1 retry=b >nul

That command tells the computer to be patient and wait for the printer to respond even if the wait is long. Use that command just if your printer’s an inkjet or a slow (4-page-per-minute) laser printer.

Omit that command if you’re using DOS 95 (which handles printers automatically).

In that command, omit the "Lh" if your CONFIG.SYS file lacks "umb". If your DOS is earlier than version 4, it doesn’t understand "Lh" and "retry=b", so say this instead:

mode LPT1 ,,p >nul

Your own AUTOEXEC.BAT If your drive C’s root directory doesn’t contain an AUTOEXEC.BAT file yet, create one! For example, you can create an AUTOEXEC.BAT file for DOS 6.2 by typing this —

@echo off

path c:\dos;c:\windows

set temp=c:\temp

set blaster=a220 i7 d1 t4

set sound=c:\sgnxpro

Lh mouse

Lh doskey

Lh mscdex /d:mscd000 /m:12 /e

Lh mode LPT1 retry=b >nul

and then pressing the F6 key and then ENTER. But remember that you must modify those commands to handle your computer’s peculiarities, as I suggested when I explained each command.

If your drive C’s root directory contains an AUTOEXEC.BAT file already, you can edit it by saying "edit autoexec.bat" (in modern DOS) or "edlin autoexec.bat" (in classic DOS). But before you perform surgery on your AUTOEXEC.BAT file, copy it onto a floppy disk (by saying "copy autoexec.bat a:"), so that if you make a mistake you can return to what you had before.

The computer examines the commands in AUTOEXEC.BAT just when the computer is booting. If you edit AUTOEXEC.BAT or create a new AUTOEXEC.BAT, the computer won’t obey the new AUTOEXEC.BAT equations until the next time you boot the computer.

If your dealer or colleague has put many strange lines into your AUTOEXEC.BAT file, don’t erase them until you discover their purpose. When in doubt, leave AUTOEXEC.BAT alone.

Hints If you’re ambitious and try to "improve" an AUTOEXEC.BAT file, here are some hints.

Make sure it’s the top line that says "@echo off".

Just one line should say "path". For example, if a line says "path c:\dos" and a line says "path c:\windows", combine them into a single line saying "path c:\dos;c:\windows".

AUTOEXEC.BAT’s bottom line is particularly important: it tells the computer what to show the human when AUTOEXEC.BAT finishes. If AUTOEXEC.BAT’s bottom line says "win", the computer will automatically do Windows 3.1 (or 3.11). If that line says "dosshell" instead, the computer will automatically run the DOS shell program, which crudely imitates Windows. If that line says "menu" instead, the computer will automatically display a list of programs for the human to choose from (if you or your dealer created a file called "MENU.BAT" or "MENU.COM" or "MENU.EXE"). If AUTOEXEC.BAT’s bottom line mentions some other program instead, the computer will automatically run that program.

Though it’s cute to see the computer automatically run Windows 3.1, the DOS shell, a menu, or another program, it’s a nuisance if you’d rather run a different program instead. I recommend that you delete any such line, so the computer will just say "C:\>" and wait for you to choose which program to run next. Then after that C prompt, type "win" or "dosshell" or "menu" or the name of some other program.

Remove any line saying "cls", since "cls" makes the computer hide error messages that you ought to see!

Remove any line saying "ver", since "ver" just makes the computer print a distracting message saying which DOS version you’re using.

You can remove any line saying "verify off", since the computer does "verify off" even if you don’t say so!

If a Windows program ever gripes about "share", you can stop the griping in three ways: either make your AUTOEXEC.BAT file say "share /L:500 /f:5100" or switch to DOS 95 (which handles "share" automatically) or improve your Windows (by inserting a line saying "device=vshare.386" into the [386Enh] section of a file called WINDOWS\SYSTEM.INI).

If your CONFIG.SYS file has a line mentioning "shell=c:\dos\command.com" (which tells the computer to find COMMAND.COM in the DOS folder instead of in the root directory), your AUTOEXEC.BAT file should have a line saying "set comspec=c:\dos\command.com".

Every modern computer includes a battery-powered clock/calendar chip, which keeps track of the time and date even when the computer is turned off. That chip is missing from old-fashioned computers (such as the original IBM PC), which must be coached by inserting "date" and "time" lines into your AUTOEXEC.BAT file.

For free help in editing your AUTOEXEC.BAT file, phone me anytime at 617-666-2666.

No AUTOEXEC.BAT If the computer doesn’t find AUTOEXEC.BAT, the computer just prints a DOS prompt and waits for you to type a DOS command. (If you’re not using DOS 95, the computer performs the "date" and "time" commands, which ask you to confirm the date and time, before printing the DOS prompt.)

Riddle Congratulations! Now you’re smart enough to master the answer to the favorite riddle among programmers.

Riddle: What do you get when you cross Lee Iacocca with a vampire?

Answer: an AUTOEXEC.BAT!

Your input

After the computer deals with the issue of AUTOEXEC.BAT, the computer waits for you to type something on the keyboard (such as a DOS command).

Reboot

You’ve learned that when you turn the computer on, the computer performs this boot procedure: the computer does a power-on self test (POST), decides whether to boot from drive A or drive C, then obeys all commands in the boot drive’s IO.SYS, MSDOS.SYS, CONFIG.SYS, COMMAND.COM, and AUTOEXEC.BAT and waits for your input.

After using the computer awhile, suppose you hit some wrong keys that make the computer start acting strangely, and you’re so confused by the whole situation that you don’t know what to do. When all else fails, boot the computer again. That’s called rebooting. Here are three ways to reboot.…

Method 1: power down Turn the computer off. Wait 10 seconds (for the RAM chips to cool down and forget whatever crazy stuff they were thinking of). Turn the computer back on again.

Since that procedure makes you wait for the RAM chips to cool down, it’s called a cold reboot.

Method 2: RESET Press the RESET button, by using your favorite finger.

That button’s not on the keyboard. Instead, it’s usually on the front of the computer system’s unit, somewhere near the floppy drive’s door.

(You’ll find the RESET button on most clones but not on computers built by IBM. On some obsolete clones, the reset button is on the back of the system unit.)

When you press that button, the computer stops whatever it was doing. The screen goes blank. The computer beeps, then reboots by doing the POST, etc.

That’s called "giving the machine the finger". It’s also called a one-finger reboot or hardware reboot or hard boot.

Method 3: Ctrl Alt DELETE While holding down the Ctrl and Alt keys simultaneously, tap the key that says "Delete" (or "Del"). That requires three fingers!

That signal makes the computer stop whatever it was doing. The screen should goes totally blank. (If you’re using DOS 95 and the screen does not go totally blank, give the signal again.) The computer beeps, then reboots. But the computer abridges the reboot procedure: during the POST, it doesn’t bother testing the RAM.

That’s called "giving the machine three fingers". It’s also called a three-finger reboot or software reboot or soft boot or warm boot. It’s the fastest way to reboot, since you don’t have to wait for the RAM test or for the machine to cool down. But if the computer ever goes so wacko that it ignores your keyboard, it also ignores that three-finger reboot, so you must use one of the other rebooting methods instead.

"Hey, honey, how’s work at the computer? Getting frustrated? Computer’s not being nicey-nicey to yoosy-yoosy? Why don’t you do a soft, warm boot? But wait, here’s a soft, warm boot! In fact, here’s a pair of them! Merry Christmas!"

I have a nightmare that when making love to a woman, I accidentally hit the wrong combinations of her "buttons", she reboots, and I realize she was just a machine.

I’ve met people like that. Haven’t you? In the middle of a pleasant relationship, you accidentally hit the wrong "buttons", the person nastily reboots, and you realize the person you’ve been admiring is just a machine.

If you’re a politician, your goal is to make the voters find your opponent’s reset button before they find yours.

Make a disk bootable

When you boot the computer (by turning it on, pressing RESET, or pressing Ctrl ALT DELETE), the computer looks in drive A or C for a bootable disk (a disk that’s been formatted and contains the two hidden system files and COMMAND.COM).

When you buy DOS, it usually comes on a pile of floppy disks. In that pile, the first disk is bootable. (Exception: if you bought the DOS 5, 6, 6.2, or 95 upgrade instead of DOS 5, 6, or 6.2 itself, the first disk in the DOS upgrade’s pile is not bootable.)

If your computer came with a hard disk containing DOS, your hard disk is bootable.

If you have a bootable disk, you can make other disks become bootable. For example, if you have a bootable hard disk, here’s how to make a blank floppy become bootable.…

First, turn the computer on without any floppy in the drive, so the computer says "C:\>". Then put the blank floppy into drive A.

If the floppy wasn’t formatted yet, say "format a: /s". That formats the floppy and copies onto it the two hidden system files and COMMAND.COM.

If the floppy was formatted already, say "sys a:". That copies the two hidden system files to the floppy. If your DOS is modern, that command also copies COMMAND.COM. (If your DOS is classic, say "sys a:" and then say "copy command.com a:".)

How to make a blank hard disk bootable Suppose you buy a hard disk that’s new and totally blank, so it doesn’t even contain DOS. Here’s how to make it bootable.

First, the hard disk must be low-level formatted. It’s been low-level formatted already if the drive is IDE or if your dealer is nice. Otherwise, you must do a low-level format yourself. (The way to do a low-level format depends on which hard drive, hard-drive controller, and CPU you bought. For details, ask your dealer.)

Next, put the first DOS floppy into drive A and turn the computer on. If you’re using DOS 4 or modern DOS, the computer will automatically install DOS onto your hard disk and make the hard disk bootable; just follow the instructions you see on the screen. If you’re using an earlier DOS, you must go through the following procedure instead.…

The computer will say "A>" or "A:\>".

Next, tell the computer how to split the hard drive into several parts, called "drive C", "drive D", drive E", etc. Each of those parts is called a partition. To partition the hard drive, say "fdisk". The computer will say:

Choose one of the following:

1. Create DOS partition

2. Change Active Partition

3. Delete DOS Partition

4. Display Partition Information

Enter choice: [1]

Choose option 1, by pressing the ENTER key. The computer will ask you several questions; respond to each by pressing the ENTER key. Tell the computer to make the primary DOS partition (drive C) be as large as possible and active. At the end of the process, reboot the computer (with the first DOS floppy still in drive A), so you see "A>" again.

Then say:

A>format c: /s

That makes the computer format drive C. The "/s" makes the computer copy the hidden system files and COMMAND.COM onto drive C, so drive C becomes bootable.

(When you give that format command, if the computer gripes by saying "Invalid drive specification", try again to partition the hard drive.)

Special keys

You can press these special keys.…

PAUSE key

Suppose you say "dir dos" or give some other command that makes the computer print a long message on your screen. If the computer is printing faster than you can read, make the computer pause (so you can catch up and read the message) by pressing the PAUSE key. That makes the computer pause until you press another key (such as ENTER).

On modern keyboards, which have 101 or 102 keys, the PAUSE key is the last key in the top row. Older keyboards, which have just 83 keys, lack a PAUSE key: instead, tap the NUM LOCK key while holding down the Ctrl key.

Break (Ctrl PAUSE)

Suppose you tell the computer to perform an activity that takes lots of time (such as print a long directory, or format a disk, or copy an entire disk). While the computer is performing, suppose you change your mind and want the computer to stop.

To make the computer stop, tell the computer to break the activity. Here’s how: tap the PAUSE key while holding down the Ctrl key.

(If your keyboard doesn’t have a PAUSE key, tap the SCROLL LOCK key while holding down the Ctrl key.)

The computer will stop the activity. Then tell the computer what to do next: type your next command.

Alt characters

You can type these special characters:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For example, here’s how to type the symbol ñ, whose code number is 164. Hold down the Alt key; and while you keep holding down the Alt key, type 164 by using the numeric keypad (the number keys on the far right side of the keyboard). When you finish typing 164, lift your finger from the Alt key, and you’ll see ñ on your screen!

Those characters are called alternate characters or Alt characters or IBM graphics characters.

Repeat (F3)

To repeat a DOS command, press the F3 key, then ENTER. Here are examples.…

Suppose you have a file called MARY and say "print mary" to print it on paper. To print a second copy (to hand a friend), you don’t have to say "print mary" again: just press the F3 key. That makes the computer automatically put the words "print mary" on the screen again. Then press ENTER.

Suppose you say "dir a:" to display a directory of the floppy in drive A. To see the directory of another floppy, put that floppy into drive A and then press the F3 key, which makes the computer say "dir a:" again. Press ENTER.

Suppose your hard disk contains a folder called SARAH, and you have a pile of floppy disks containing info that’s simple (no folders or hidden files). Here’s how to copy everything from those floppy disks to SARAH. Put the first floppy into drive A. Copy everything from that floppy to SARAH by saying "copy a:*.* sarah". Put the second floppy into drive A, then press the F3 key and ENTER. Put the third floppy into drive A, then press the F3 key and ENTER.

Sometimes, the computer ignores the F3 key. That happens if you’ve recently given a command (such as "edit") that uses lots of RAM and "steals" that RAM from the F3 command.

If your AUTOEXEC.BAT says "Lh doskey" (because your DOS is modern), you can press the up-arrow key instead of F3. The up-arrow key has two advantages over F3:

The up-arrow key is easier for humans to remember than F3 (which beginners confuse with F2 and F4).

Unlike F3, the up-arrow key always works, even if you recently gave a command such as "edit" that consumes lots of RAM.

F5 (in DOS 6 & 6.2)

In case CONFIG.SYS or AUTOEXEC.BAT contain errors that prevent the computer from booting properly, DOS 6 & 6.2 let you perform this trick.…

Try booting the computer; but when the computer says "Starting MS-DOS", immediately press the F5 key. That makes the computer skip CONFIG.SYS and AUTOEXEC.BAT and just give you a DOS prompt.

F8 (in DOS 6 & 6.2)

When the computer says "Starting MS-DOS", try pressing F8 immediately (instead of F5).

Then the computer shows you each line of CONFIG.SYS and asks you whether to obey the line. Press Y to make the computer obey the line, or press N to make the computer ignore the line.

Then the computer asks you whether to obey AUTOEXEC.BAT. Press Y or N. If you press N, the computer skips AUTOEXEC.BAT. If you press Y instead, here’s what happens: DOS 6 makes the computer do all of AUTOEXEC.BAT; DOS 6.2 makes the computer show you each line of AUTOEXEC.BAT and ask you to press Y or N for each line.

Analyze your computer

To analyze your computer, you can type "dir" (which tells you which files are on the disk) and "chkdsk" (which tells you how much the disk can hold, how much free space is left on the disk, how much conventional RAM you have, and how much free space is left in conventional RAM). I explained those commands earlier.

Now I’ll reveal additional commands, which let you analyze your computer more thoroughly, diagnose hidden ills, and help you cure those illnesses. Give these additional commands whenever you buy a new computer and want to find out whether you were ripped off, or whenever your computer acts sick, or whenever you want to supercharge your computer and make it super-healthy, or whenever you’re just plain curious about how your computer is faring!

Mem (in DOS 4 & modern DOS)

DOS 4, 5, 6, 6.2, and 95 will tell you how much RAM memory is in your computer, if you say "mem".

DOS 6.2 For example, my DOS 6.2 computer has a 4-megabyte RAM. Saying "mem" makes it print this table on my screen:

Memory Type Total = Used + Free

---------------- ------- ------- -------

Conventional 640K 20K 620K

Upper 91K 26K 65K

Reserved 384K 384K 0K

Extended (XMS) 2,981K 485K 2,496K

---------------- ------- ------- -------

Total memory 4,096K 915K 3,181K

That table’s bottom line says the computer has 4 megabytes (4,096K) of memory chips. 915K of that memory is being used already, leaving 3,181K free to hold additional programs and data.

The table’s other lines show how the 4 megabytes is split into several parts: conventional RAM, upper RAM, reserved RAM, and extended RAM.

Next, the computer prints a line of subtotals. Those subtotals show what happens when you add the conventional and upper RAM together:

Total under 1 MB 731K 46K 685K

Then the computer prints this message:

Total Expanded (EMS) 3,392K (3,473,408 bytes)

Free Expanded (EMS) 2,736K (2,801,664 bytes)

That means 3,392K of my extended RAM can be turned into expanded RAM. Some of that expanded RAM is consumed by the EMM386.EXE program itself, leaving 2,736K free.

If you say "mem /c/p" (which means "MEMory Classification with Pauses"), the screen will display a more detailed message, which also lists each program in the first megabyte and reveals how much RAM each of those programs consumes. (When you finish reading the first screenful, press ENTER to see the second.)

DOS 95 In DOS 95, saying "mem" has almost the same effect as in DOS 6.2 but omits the "=" and "+" symbols from the top line.

DOS 6 In DOS 6, saying "mem" has almost the same effect as in DOS 6.2. Unfortunately, DOS 6 is too stupid to put commas in big numbers, and DOS 6 says "Adapter RAM/ROM" instead of "Reserved".

DOS 4 & 5 In DOS 4 & 5, saying "mem" makes the computer print this kind of message on your screen:

Message Meaning

655360 bytes total conventional memory The conventional RAM is 655,360 bytes (640K).

655360 bytes available to MS-DOS All of those bytes can be used.

630480 largest executable program size Since DOS itself consumes some of those bytes,

630,480 bytes remain for programs to use.

1441792 bytes total EMS memory The EMS expanded memory is 1,441,792 bytes,

1048576 bytes free EMS memory of which 1 megabyte is left for programs to use.

3145728 bytes total contiguous extended memory Main extended memory is 3 megs.

0 bytes available contiguous extended memory None of those bytes are wasted.

1900544 bytes available XMS memory Some of those bytes were turned into expanded

memory, leaving 1,900,544 bytes.

Missing memory? If the "mem" command reports less available free memory than you expected, increase the available free memory by editing your CONFIG.SYS and AUTOEXEC.BAT files.

For example, to make modern DOS manage extended memory, make sure your CONFIG.SYS file says "device=dos\himem.sys". To make modern DOS manage expanded memory on a 386, 486, or Pentium, make sure CONFIG.SYS mentions "emm386". In CONFIG.SYS and AUTOEXEC.BAT, avoid mentioning "smartdrv", which consumes lots of RAM; but if you omit "smartdrv", make CONFIG.SYS say "buffers=40".

Further suggestions about increasing your memory are on page 599 (column 2) and page 600.

Skip to next section?

DOS 6 & 6.2 let you do advanced analysis by giving four commands: msd, scandisk, defrag, and msav.

If your DOS is earlier than 6, it doesn’t understand those commands. If your DOS is 95, those commands are worthless, since Windows 95 lets you use better tools to accomplish those tasks.

Now I’ll explain how to use those four commands — but if your DOS is 95 or earlier than 6, you can skip ahead to the next section (called "Print on paper").

Msd (in DOS 6 & 6.2)

If you have DOS 6 or 6.2 or Windows 3.1, you can say "msd". That makes the computer run the MicroSoft Diagnostics program, which analyzes your computer and prints its analysis on the screen.

The analysis tells you who manufactured the motherboard and ROM BIOS chip, what kind of CPU chip you have (8088, 286, 386, or 486-and-beyond), how much RAM you have (conventional, extended, and expanded), what kind of video card you have, whether you’re attached to a network, which version of DOS you’re using, what kind of mouse you have, whether you have a game card (to attach a joystick), which disk drives you have (A, B, and C), how many parallel printer ports you have (to attach printers to), how many serial ports you have, and more!

If your CPU chip’s a Pentium but you’re using an old version of MSD invented before Pentiums, MSD’s analysis incorrectly says you have a "486". If somebody sells you a Pentium but MSD says you have a 486, don’t worry: the seller probably told you the truth, you did get a Pentium, and the liar is MSD.

When you finish reading the analysis, press the F3 key.

Scandisk (in DOS 6.2)

The "chkdsk /f" command makes the computer fix errors on your hard disk — but just the errors that are obvious. To fix all important errors, even the errors that are not obvious, say "scandisk" instead, like this:

C:\>scandisk

That command works just if you have DOS 6.2. Once you’ve given that command, the computer says, "ScanDisk is now checking drive C".

Then the computer starts testing five aspects of drive C: the drive’s media descriptor, the file allocation tables, the directory structure, the file system, and the surface scan. Each of those tests is quick (just a few seconds), except for the surface scan, which typically takes about 20 minutes.

The computer does the four quick tests. Then it gives you an estimate of how long the surface-scan test will take. It asks you:

Do you want to perform a surface scan now?

If you do, press ENTER; if you don’t (because you’re too impatient to wait for it to finish), press N instead.

During all those tests, if the computer detects a error on your hard disk, the computer will try to fix it. Just follow the computer’s instructions on the screen! If the computer says "ScanDisk found data that might be lost files or directories", press L then S.

Verdict When the computer has finished all tests you requested, the computer will give you its verdict.

If you’re very lucky, the computer will give you this verdict:

ScanDisk did not find any problems on drive C.

If you’re somewhat lucky, the computer will say this instead:

ScanDisk found and fixed problems on drive C.

If you’re totally luckless, and your disk is too hideously screwed up to be fixable, the computer will give up and just say:

There are still errors on drive C.

Dismissal After the computer prints one of those three verdicts, press the X key.

Other drives If you want the computer to fix the disk that’s in drive A instead of C, say "scandisk a:", like this:

C:\scandisk a:

 

Defrag (in DOS 6 & 6.2)

Suppose you delete a small file from your hard disk, so your hard disk acquires a small unused gap. If you then try to put a big file onto your hard disk, the computer might put part of the big file into the small unused gap and put the rest of the big file elsewhere, so that the big file consists of two separated fragments. In that case, the big file is said to be fragmented. Unfortunately, a fragmented file slows down the computer, since the computer must look in two separate parts of the disk to find the complete file.

To make the computer handle the hard disk faster, rearrange the files on the disk so that none of the files are fragmented. That’s called defragmenting the disk (or defragging the disk).

How to defrag DOS 6 & 6.2 let you defrag drive C easily. Here’s how.

First, make the computer display a normal C prompt, so you see this:

C:\>

Next, make sure your disk is acting reliably. To check your disk’s reliability, say "scandisk" (in DOS 6.2) or "chkdsk/f" (in DOS 6).

After you’ve assured yourself that your disk is acting reliably, say "defrag c: /f", like this:

C:\>defrag c: /f

That makes the computer defrag drive C fully. The computer will also put your files as close as possible to the directory tracks (the outermost tracks), so the computer can access the files faster.

Usually, the process takes several minutes. (While you’re waiting, go have a cup of coffee or a snack or go work on a non-computerized problem or make love.) When the computer’s finished, it will play a quick burst of joyous music and then say "C:\>" again, so you can give another DOS command.

When to defrag About once a month (or whenever you’re in the mood!), say "defrag c: /f" again, which rearranges the files again and restores youthful peppiness to your hard drive. Yes, saying "defrag c: /f" is like letting your hard drive drink from the fountain of youth!

Msav (in DOS 6 & 6.2)

To make sure your hard disk doesn’t have any viruses, run the MicroSoft Anti-Virus program by saying "msav" at the C prompt, like this:

C:\>msav

The computer will say "MicroSoft Anti-Virus" and "Main Menu". Press ENTER.

The computer will check your entire RAM and hard disk for viruses. That’s called scanning for viruses (or doing a virus scan).

If the computer finds a virus, the computer will say "Virus Found". The computer will tell you the virus’s name and which file it infected. To respond, press ENTER. The computer will get rid of the virus. That’s called cleaning out the virus.

If the computer notices a program was changed since the previous time you said "msav", the computer will say "Verify Error". The computer will tell you the program’s name and how the program was changed. Usually this "Verify Error" message does not mean you have a virus; it usually means just that you installed a newer version of the program. To respond, press either D (to delete the program, because you think it’s infected by a virus) or U (to tell the computer that you changed the program intentionally and to Update the computer’s understanding of it) or O (to temporarily ignore the problem and cOntinue).

When the computer has finished scanning for viruses, the computer will brag about the number of "Viruses Detected and Cleaned". Press the ENTER key, then the X key, then the ENTER key again.

CHKLIST.MS While running the MicroSoft Anti-Virus program, the computer usually puts into each directory an extra file called CHKLIST.MS, which is a CHecKLIST created by MicroSoft. It lets the computer check for future "Verify Errors". The next time you say "msav", the computer looks at those CHKLIST.MS files again to see whether any suspicious changes have been occurring on your hard disk.

If you’re confident you won’t acquire any viruses soon, you can erase those CHKLIST.MS files. Here’s how.

Say "msav" again at the C prompt, like this:

C:\>msav

The computer will say "MicroSoft Anti-Virus" and "Main Menu". To delete all the CHKLIST.MS files, press the F7 key, then ENTER, then X, then ENTER again.

Other drives To make the computer check whether drive A contains any viruses, say "msav a:", like this:

C:\>msav a:

Check all disks If the computer ever finds a virus on one of your disks, make the computer check all your floppy disks and any additional hard disks you have, since the virus might have spread. If you’ve been swapping floppy disks or electronic mail with your friends, tell those friends you got a virus and to scan their disks too!

New viruses Unfortunately, many new viruses have been invented recently. They outwit the "msav" command, which can’t detect them.

These new viruses have spread and become the most common viruses. Since they’re not detected by the "msav" command, that command is rather useless.

Your computer is probably healthy and virus-free; but if your computer does have a virus, you’ll probably need to buy a more powerful anti-virus program to eradicate the virus.

Print on paper

Normally, the computer prints its answers on the screen. To make the computer print its answers on the printer’s paper instead, use any of the following methods.…

Prn

When giving a DOS command, you can use the printer by saying "prn". Here are examples.…

Redirect to printer If you type ">prn" at the end of a command, the computer will send the answers to the printer instead of to the screen.

For example, to make the computer send a directory of drive A to the printer (instead of to your screen), give this command: "dir a: >prn". That’s pronounced, "directory of drive A, redirected to the printer". The space before the symbol ">" is optional: you can say either "dir a: >prn" or "dir a:>prn".

To print "I love you" on paper, give this command: "echo I love you>prn".

To type all the lines of file MARY onto paper (instead of onto your screen), say "type mary>prn".

Laser printers If you’re using a laser printer (such as the Hewlett-Packard Laserjet 2), you might see the printer’s FORM FEED light go on. That means a sheet of paper has been printed and is waiting to be removed from the printer.

To remove the paper, turn off the ON LINE light (by tapping the ON LINE button), then press the FORM FEED button.

After you’ve removed the paper, turn the ON LINE light back on (by pressing the ON LINE button again).

Copy file to printer Another way to copy all the lines of MARY onto your printer’s paper is to say "copy mary prn".

To send info directly from your keyboard (console) to the printer, say "copy con prn". Underneath that command, type whatever sentences you want the printer to print. When you finish typing your last sentence, press the F6 key and then the ENTER key. Then the printer will print all the sentences.

PRINT SCREEN key (in every DOS except 95)

If your keyboard is modern (with 101 keys), one of the keys is marked "Print Screen".

Dump Pressing the PRINT SCREEN key makes the printer dump onto paper a snapshot of everything that’s on the screen. The snapshot on the paper is called a screen dump.

PrtSc key If your keyboard has just 83 keys (instead of 101), it has a "PrtSc" key instead of a "Print Screen" key. On such a keyboard, here’s how to get a screen dump: while holding down the SHIFT key, press the "PrtSc" key.

Laser printers If you’re using a laser printer, eject the paper manually (by pressing the ON LINE button, then the FORM FEED button, then the ON LINE button again).

IBM graphics characters If you try to make your printer print an IBM graphics character (such as Alt 164, which is ¤), the printer might print a weirder character instead, unless you’re using software (such as a word processor) that reminds the printer to use IBM graphics characters.

Echo Try this experiment: while holding down the CONTROL key (which is marked "Ctrl"), tap the PRINT SCREEN key (or PrtSc key). Then lift your fingers. That makes the computer perform this trick: it waits for you to type something, then copies your typing onto paper. The copying onto paper is called echoing.

The computer will continue echoing onto paper whatever you type on the screen (and whatever the computer types on the screen), until you tell the computer to stop echoing (by pressing CONTROL with PRINT SCREEN again).

Notice that to stop the echo, you hit the same keys that started the echo. That situation’s called a toggle. A toggle is a key (or series of keystrokes) that tells the computer to start a process and, when hit again, tells the computer to stop.

Computerists say, "The printer-echo toggle is CONTROL with PRINT SCREEN." They also say, "To toggle the printer echo, hit CONTROL PRINT SCREEN."

Print (in every DOS except 95)

Another way to print all MARY’s lines onto paper is to say "print mary".

(If the computer says "Bad command or file name", your computer is set up incorrectly and can’t find the PRINT.COM program. In that case, remind the computer where the PRINT.COM program is. For example, if the PRINT.COM program is in your hard disk’s DOS folder, say "c:\dos\print mary". If the PRINT.COM program is in drive A, say "a:print mary".)

The first time you give the print command, the computer will ask you for the "Name of list device". To reply, just press the ENTER key.

While the printer is printing MARY’s lines, the screen will show a DOS prompt and let you continue typing DOS commands. So the computer is doing two things simultaneously — it’s printing MARY’s lines at the same time that it’s letting you type additional commands. In that situation, MARY is said to be printed in the background.

When the computer finishes printing MARY, it will automatically eject the paper.

Tricks

Amaze your friends! Try these tricks.…

Dir /s (in modern DOS)

Suppose MARY is a file on your hard disk, but you forget which folder contains MARY. If your DOS is modern, just say:

C:\>dir mary /s

The "/s" makes the computer search through all folders (subdirectories). The computer will tell you which folders contain MARY.

To see a list of all your hard disk’s hidden files (even the files that are hiding in subdirectories), say:

C:\>dir /ah /s

The "/ah" means "hidden". The "/s" means "search through all subdirectories".

To see a list of all your hard disk’s unhidden files (even the ones in subdirectories), say:

C:\>dir /s/w/p

The "/s" means "search through all subdirectories". The "/w" and "/p" make the computer’s answer easier to view, by making the directory appear wide and be paused at the end of each page.

/? (in modern DOS)

Modern DOS lets you put "/?" at the end of any command. That makes your screen show a short reminder of how to use the command and its switches.

For example, if you say "dir /?", your screen will show a short reminder of how to use the "dir" command and how to use "dir" switches (such as /p, /w, /o, /od, /os, /oe, /oen, /l, /b, /ah, /ad, and /s).

Help (in modern DOS but not 95)

The computer can understand your cry for help.

DOS 5 If you say "help", DOS 5 prints on your screen an alphabetical list of all DOS commands and explains briefly what each command means.

(You see the first part of that list. Press ENTER to continue and see the next part. To see the list on paper instead, say "help>prn".)

DOS 6 & 6.2 If you say "help", DOS 6 & 6.2 print on your screen an alphabetical list of all DOS commands.

(You see the top part of the list. To see the list’s bottom, depress the down-arrow key awhile, or press the PAGE DOWN key twice. To see the top of the list again, press the PAGE UP key twice.)

The commands are arranged in three columns.

For details about a particular command (such as "dir"), move the blinking cursor to that command by using the down-arrow key, up-arrow key, PAGE DOWN key, PAGE UP key, or TAB key. (The TAB key moves from column to column.) When the cursor’s reached that command, press ENTER.

You’ll see details about the command’s syntax (vocabulary and grammar). If the details are too long to fit on the screen, see the rest of them by pressing the PAGE DOWN key several times. If you want to print all the details on paper, tap the Alt key then F then P then ENTER.

When you finish examining the command’s syntax, do this: while holding down the Alt key, tap the N key (which means "Next topic"). That gives you the next topic (the command’s notes, or examples of how to use the command, or another command). To go back to the previous topic, do this: while holding down the Alt key, tap the B key (which means "Back").

When you finish using the help system, tap the Alt key, then F, then X.

Undelete (in modern DOS but not 95)

Suppose you accidentally delete some important files. If your DOS is modern, you can get the files back!

That’s because when you say to delete a file, the file does not vanish. Instead, the file stays on the disk, but the filename’s first letter is replaced by a symbol indicating you no longer need the file. That old file stays on the disk until newer files need to use that part of the disk. Then the old file gets covered up by the newer files.

Here’s how to try getting that old, deleted file back. (This method works only if you haven’t created newer files that use the same part of the disk.)

First, go to the drive and subdirectory where the deleted files were. For example, if the files were in drive A, make the computer say:

A:\>

If the files were in the hard drive’s SARAH folder, make the computer say:

C:\SARAH>

Then say "undelete". (If the computer says "Bad command or filename", the computer can’t find the UNDELETE.EXE file that defines the word "undelete".)

The computer will search on the disk for files you recently said to delete. (If the computer says "No entries found", you’re probably in the wrong drive or wrong folder, or the files can no longer be undeleted.)

When the computer finds a recently deleted file, it will print the file’s name, except that the first letter will be replaced by a question mark. For example, if the file’s name was MARY, the computer will say "?ARY". Then the computer will ask, "Undelete?" If you really want to undelete MARY, press Y; otherwise, press N. If you press Y, the computer will say, "Please type the first character for ?ARY". Since the first character of MARY is M, press M.

The computer will do that procedure for each deleted file. Afterwards, to prove the files have been undeleted, say "dir".

Remark (rem)

When the computer obeys your CONFIG.SYS file or a batch file (such as AUTOEXEC.BAT), the computer ignores any line that begins with the word "rem".

For example, suppose your AUTOEXEC.BAT file contains a line saying "Lh share /L:500 /f:5100", and you’re debating whether to omit that line. Just insert "rem" at its beginning, so it becomes "rem Lh share /L:500 /f:5100", which makes the computer ignore the line. Then reboot the computer and see whether you like what happens. If you don’t like what happens, edit that line again and remove the "rem". Inserting and removing the "rem" is quicker than deleting and retyping the entire line.

The word "rem" means "remark". When the computer encounters a line that begins with the word "rem", the computer assumes the line is just a "remark" you’re mumbling to yourself, so the computer ignores the line.

The line beginning with "rem" can be a command you want to deactivate (such as "rem Lh share /L:500 /f:5100") or a remark you want to make to humans (such as "rem this batch file was written by Joey when drunk" or "rem the next three lines were written by Microsoft to control the mouse").

More

Suppose your disk contains a poem called MARY. To see that poem on your screen, the usual method is to say "type mary". But if MARY contains more than 23 lines, it won’t all fit on the screen.

One way to see the long poem is to say "type mary" and then keep hitting the PAUSE key (to see a piece of the poem at a time).

An easier way to see the poem is to say "more<mary". That resembles "type mary" but makes the computer automatically pause at the end of each screenful. (To make the computer continue to the next screenful, press ENTER.)

The command "more<mary" is pronounced, "more from mary". When typing that command, make sure you type "<", which means "from". Do not type ">".

Attrib (in DOS 3 & up)

To protect your important files from being erased accidentally, give the "attrib" command. Here’s how.

Read only To protect a file named MARY, you can say "attrib +r mary". That prevents MARY from being accidentally changed.

For example, if somebody tries to delete MARY by saying "del mary", the computer will refuse and say:

Access denied

If somebody tries to delete many files by saying "del *.*", the computer will delete most files but not MARY.

If somebody tries to create a new MARY and obliterate the old one (by saying "copy con mary", then typing some lines, then pressing F6 and ENTER), the computer will refuse and say:

Access denied - MARY

If somebody tries to edit MARY by saying "edit mary", the computer will refuse and say:

Path/file access error

If somebody tries to edit MARY by saying "edlin mary", the computer will refuse and say:

File is READ-ONLY

If somebody tries to find out what MARY is (by saying "dir mary" or "type mary" or "copy mary prn") or rename MARY (by saying "rename mary lambchop"), the computer will obey. The computer will let people read MARY but not destroy what’s in MARY. That’s because saying "attrib +r mary" means, "give MARY the following ATTRIBute: Read only!"

MARY will remain read-only forever — or until you cancel the "attribute read-only". To cancel, say "attrib -r mary". In that command, the "-r" means "take away the read-only attribute", so that MARY is not read-only and can be edited.

Hide (in modern DOS) For a different way to protect MARY, say "attrib +h mary". That hides MARY, so that MARY will not be mentioned when you type "dir".

After you’ve hidden MARY, it will not be affected by any "del", "rename" or "copy". If you try to wreck MARY by copying another file to it, the computer will say "Access denied". If you try to change MARY’s attributes by saying "attrib +r mary" or "attrib -r mary", the computer will refuse and say "Not resetting hidden file".

Although MARY is hidden and isn’t mentioned when you say "dir", the computer will let you access that file if you’re somehow in on the secret and know that the file exists and is called "MARY". For example, the computer will let you look at the file by saying "type mary" and edit the file by saying "edit mary" or "edlin mary". Although the computer won’t let you delete the file by saying "del mary", it will let you delete the file by saying "deltree mary" (in DOS 6 & up). If you say "edlin mary" (because your DOS is too old to understand "edit"), be careful: after the editing is done, the new MARY will be visible unless you say "attrib +h mary" again.

If MARY is hidden, you can "unhide" MARY (and make MARY visible again) by saying "attrib -h mary".

System (in modern DOS) For an alternate way to hide MARY, say "attrib +s mary". That turns MARY into a system file, which is similar to being hidden.

For the ultimate in hiding, say "attrib +h +s mary". Then even if somebody tries to unhide MARY by saying "attrib -h mary", MARY will still be hidden by the +s.

To undo the +s, say "attrib -s mary".

Normal After playing with MARY’s attributes, you can make MARY be normal again by saying "attrib -r -h -s mary". That makes MARY be not read-only, not hidden, and not a system file.

Examine the attributes To examine MARY’s attributes, say "attrib mary". The computer will say "MARY" and print some letters. For example, if it prints the letters R, H, and S, it means MARY is read-only, hidden, and system. If it prints just the letters R and H, it means MARY is read-only and hidden but not system. (It might also print the letter A, which means "archive". Most files are archive.)

If you say just "attrib" (without mentioning MARY), the computer will print a directory that tells you the attributes of every file.

Xcopy (in DOS 3.2 & up)

Instead of saying "copy", try saying "xcopy", which means: eXtended copy. The "xcopy" command resembles "copy" but has eXtended abilities, so it can perform fancier tricks.

To use "xcopy", your DOS must be version 3.2, 3.3, 4, or modern. Since "xcopy" is an external command (defined by XCOPY.EXE), it works just if your computer is set up correctly and can find the XCOPY.EXE file.

Here are examples of using "xcopy".…

Duplicating a floppy Suppose drive A contains a 5¼-inch floppy full of info, drive B contains a blank formatted 3½-inch floppy, and you want to copy all files from drive A to drive B.

Since the drives are different sizes, you can’t say "diskcopy a: b:". You can say "copy a:*.* b:"; but that copies just the files in the root directory, not the folders.

To copy all files — even the files that are in folders — say "xcopy a: b: /s". The "/s" makes sure that the copying includes all folders (subdirectories) that contain files.

In modern DOS, that command copies all files except hidden and system files (such as IO.SYS and MSDOS.SYS). Classic DOS copies even those files.

That command doesn’t bother copying folders that are empty. To copy all folders, even the ones that are empty, say "xcopy a: b: /s/e".

Copying a floppy to the hard disk Suppose drive A contains a floppy full of info. Here’s how to create a folder called SARAH on your hard disk and make it contain everything that was on the floppy (all the floppy’s files and folders):

C:\>xcopy a: sarah\ /s/e

In that command, the backslash after "sarah" makes the computer create a folder named SARAH if it doesn’t exist already. (By typing that backslash, you don’t have to bother saying "md sarah".)

The "/s/e" makes the computer copy everything from the floppy — even the floppy’s folders. If you omit the "/s/e", the computer will copy just the files in the floppy’s root directory.

Duplicating a folder Suppose your hard disk contains a folder called SARAH. Here’s how to make a copy called SARAH2 (so that your hard disk will contain both SARAH and SARAH2):

C:\>xcopy sarah sarah2\ /s/e

In that command, the backslash after "sarah2" makes the computer create a folder named SARAH2 if it doesn’t exist already. The "/s/e" makes the computer copy everything from SARAH — even folders that are in the SARAH folder.

Renaming a folder Suppose your hard disk contains a folder called SARAH, and you want to change its name to TONY. The computer won’t let you say "rename sarah tony". If you’re using DOS 6 & up, say this instead: "move sarah tony". If you’re using DOS 5 & down, do this instead: create a copy of SARAH called TONY (by saying "xcopy sarah tony\ /s/e"), then remove SARAH (by saying "rd sarah" after deleting all of SARAH’s files).

Copying a folder to a floppy Suppose your hard disk contains a folder named SARAH. Here’s how to copy all SARAH’s files to a floppy in drive A.

To be simple, let’s assume SARAH contains no hidden files and no folders (or you don’t want to copy any such hidden files or folders).

Since this is a simple copying job, you can probably use the simple "copy" command instead of "xcopy" and just say:

C:\>copy sarah a:

But suppose you run into this hassle: the floppy’s too small to hold all SARAH’s files. Then you must copy SARAH’s files to a pile of floppies.

Here’s how to copy SARAH’s files to a pile of floppies.…

Say:

C:\>attrib +a sarah\*.*

Then insert the first formatted floppy and say:

C:\>xcopy sarah a: /m

The computer will copy some files from SARAH to the floppy. When that floppy gets full, the computer will say "Insufficient disk space" and stop copying.

Then insert the second floppy. Say "xcopy sarah a: /m" again (by retyping it or by pressing the F3 key or the up-arrow key). Press the ENTER key at the end of that command. The computer will continue where it left off: it will copy different files onto that second floppy.

When the computer says "Insufficient disk space" again, insert the third floppy, and say "xcopy sarah a: /m" again (and press ENTER). Keep inserting floppies and saying "xcopy sarah a: /m", until the computer is done and no longer says "Insufficient disk space".

This method works just if each file in SARAH is brief (so that no single file is too long to fit on a floppy).

If one of the files in SARAH is huge — longer than can fit on a floppy — you must give the "backup" or "msbackup" command instead. Here’s how.…

Msbackup (in DOS 6 & 6.2)

Someday, some files will get accidentally erased from your hard disk, because you give the wrong command or your disk needs repair. To protect against that inevitable calamity, copy all your hard disk’s important files onto floppy disks. Doing that is called "backing up your hard disk onto floppies". The copies (on the floppies) are called backups.

The niftiest way to back up your hard disk is to give the"msbackup" command. To give that command, you must buy DOS 6 or 6.2. (If your DOS is earlier than 6, skip ahead to the next section, which explains how to give the old "backup" command instead.)

How to back up To back up your hard disk by giving the "msbackup" command, just say "msbackup" at the C prompt, like this:

C:\>msbackup

If you’re lucky, the computer will say "Microsoft Backup 6.0". But if your MSBACKUP program was never used before and was therefore never configured, the computer will gripe by saying "Backup requires configuration for this computer." Here’s how to respond:

Remove any floppies from your drives. Press ENTER seven times.

When the computer tells you, insert a blank disk into drive A and press ENTER.

When the computer tells you, insert a second blank disk into drive A.

The computer will say "Backup Complete". Press ENTER.

When the computer tells you, insert the first blank disk back into drive A and press ENTER.

When the computer tells you, insert the second blank disk back into drive A.

The computer will say "Compare Complete". Press ENTER three times.

Now your MSBACKUP program is configured, and the computer says "Microsoft Backup 6.0".

When the computer says "Microsoft Backup 6.0", press ENTER.

Near the left edge of the screen, you’ll see this symbol: [-C-]. That represents drive C. If you also have a drive D, you’ll also see the symbol [-D-].

Press the down-arrow key once, so you move to the [-C-], and the [-C-] becomes highlighted (its background becomes black instead of blue).

Now you have three choices:

Choice 1: if you want to back up ALL FILES from drive C (and you have a gigantic pile of floppies to put those files on), press the SPACE bar once or twice, until the phrase "All files" appears next to the [-C-].

Choice 2: if you want to back up THE SAME LIST OF FILES that you backed up the previous time, just let the [-C-] keep having the phrase "Some files" next to it.

Choice 3: if you want to back up JUST A FEW FILES from drive C, press the SPACE bar once or twice, until no phrase appears next to the [-C-]. Press ENTER. You’ll see a list of drive C’s folders (directories). Press the down-arrow key several times, until a directory you want to back up is highlighted. In the right-hand part of the screen, you’ll see a list of all files in that directory.

If you want to back up ALL the files in that directory, press the SPACE bar, so the symbol 4 appears next to the directory’s name. If you want to back up JUST ONE of the files in that directory, do this instead: press the right-arrow key (to move to the right-hand part of the screen), press the down-arrow key several times (until the file you want to back up is highlighted), and press the SPACE bar, so a check mark appears next to the file’s name.

If you want to back up SEVERAL directories, put the symbol 4 in front of each directory’s name. To back up SEVERAL files, put a check mark in front of each file’s name.

If you make a mistake and want to erase a symbol or check mark, just highlight it and then press the SPACE bar.

When you finish putting the symbols and check marks in front of everything you wish to back up, press ENTER.

After you’ve finished making one of those three choices, press S (which means "Start backup").

Put a blank floppy disk into drive A. Press ENTER. If the floppy wasn’t formatted yet, the computer will automatically format it. (If the floppy wasn’t blank, the computer will tell you what was on it; press the letter "O" to erase and Overwrite what was on it.)

The computer will back up all the folders and files you requested. If they’re too long to fit on one floppy, the computer will tell you to insert extra floppies. If you pause a while before inserting an extra floppy, you must press ENTER to confirm that you put it in.

When the computer has finished, it will say "Backup Complete". Press ENTER, then Q (which means "Quit").

How the backup is named The entire set of floppies you wrote on is called the backup set.

The backup set has a name. For example, the backup set is named "CC60124B" if the backup set was created by backing up starting at drive C, ending at drive C, in 1996, on the date 01/24, and was that date’s second backup set (backup #B).

In that backup set, the first floppy contains a gigantic file called "CC60124B.001". The second floppy contains a gigantic file called "CC60124B.002". The third floppy contains a gigantic file called "CC60124B.003". Each gigantic file is a combo of several files from the hard disk.

Restore If you ever want to use the backup set (because your hard disk has an accident), say this again:

C:\>msbackup

The computer will say "Microsoft Backup 6.0" again. Press the R key (which means "Restore").

The computer remembers the names of all the backup sets you ever created and assumes you want to use the most recent set. For example, if your most recent backup set was named "CC60124B", the computer says:

Backup Set Catalog:

CC60124B.FUL

(If you want to use an older backup set instead, press ENTER. You’ll see a list of all the sets you ever created. Press the down-arrow key until the set you want to use is highlighted, then press the SPACE bar, so a check mark appears next to the set you want. Press ENTER.)

Then press the down-arrow key twice, so the [-C-] is highlighted.

You have two choices:

Choice 1: if you want to copy ALL THE BACKUP SET’S FILES to drive C, press the SPACE bar, so the phrase "All files" appears next to the [-C-]. Then press the TAB key.

Choice 2: if you want to copy JUST ONE FILE to drive C, press the ENTER key. You’ll see a list of drive C’s directories. Press the down-arrow key several times, until the directory you’re interested in is highlighted. Then press the right-arrow key. Press the down-arrow key several times, until the file you’re interested in is highlighted. Press the SPACE bar, so a check mark appears next to the file’s name. Press the ENTER key.

After you’ve finished making one of those two choices, press S (which means "Start restore").

Put the backup set’s first floppy in drive A. Press ENTER. When the computer tells you, put remaining floppies in drive A.

When the computer has finished, it will say "Restore Complete". Press ENTER, then Q (which means "Quit").

Backup (in DOS 5 & down) & restore

The "msbackup" command requires DOS 6 or 6.2. If your DOS is 5 or earlier, use the "backup" and "restore" commands instead. Here’s how.

(If you’re using DOS 6 or 6.2, skip ahead to the next section, entitled "Subst".)

Backup First, grab a pile of floppies. Make sure each floppy is blank, formatted, and the right size to fit in drive A.

How much of the hard disk do you want to back up? The whole hard disk? Or just part of the hard disk? Just one folder? Just one file? Decide.

Then give one of these commands:

What you want to back up Command

a file named MARY in the root directory C:\>backup c:mary a:

all files in the root directory C:\>backup c: a:

the entire hard disk (all files in root directory and in all folders) C:\>backup c: a: /s

all files in the SARAH folder C:\>backup c:sarah a:

all files in the SARAH folder or in folders that are in SARAH C:\>backup c:sarah a: /s

a file named MARY in the SARAH folder C:\>backup c:sarah\mary a:

Then the computer will tell you to put a floppy into drive A. (The computer will also remind you that the floppy should be blank — and if the floppy is not blank, the computer will erase whatever was on it.) Go ahead: put a formatted floppy into drive A. Then press ENTER.

The computer will copy from the hard disk to that floppy disk. If that floppy disk becomes full, the computer will tell you to insert a second floppy disk. Put the second floppy into drive A, then press ENTER. The computer will tell you to insert a third floppy, fourth floppy, etc., until the copying is finished.

When the whole process is finished, what’s on those floppies?

If your DOS is new (version 3.3, 4, or 5), the first floppy contains a pair of files called BACKUP.001 and CONTROL.001; the second floppy contains a pair of files called BACKUP.002 and CONTROL.002; the third floppy contains a pair of files called BACKUP.003 and CONTROL.003, etc. Those BACKUP and CONTROL files contain, in code, the backup copies of your hard disk’s files.

If your DOS is earlier, the computer uses a more primitive system: the first floppy contains a file called "BACKUPID.@@@", plus many little backup files. For example, if you backed up a poem called MARY that was in the SARAH folder, one of the little backup files is called MARY; it contains the same info as the original poem but also contains an extra line saying "\SARAH\MARY", to remind the computer which folder the file came from.

Restore If you ever want to use those backup copies (because your hard disk has an accident), say:

C:\>restore a: c: /s

That makes the computer copy all files from the floppy pile back to the hard disk. If you want to copy just one of the files from the floppy pile (such as MARY in the SARAH folder), say:

C:\>restore a: c:sarah\mary

Notice that "restore" is the opposite of "backup". Use "backup" to copy from the hard disk to a pile of floppies; use "restore" to copy from a pile of floppies to the hard disk.

The "restore" command puts back on the hard disk exactly what was there before the accident. On your hard disk, the "restore" command recreates destroyed files and destroyed folders. For example, if an accident totally destroyed your hard disk’s SARAH directory, so that the name "SARAH" is no longer on the hard disk, don’t worry: if you backed up the hard disk before the accident, the "restore" command will automatically create a folder on your hard disk, and name that folder "SARAH", and put back in it all the files that were destroyed.

Since new versions of DOS handle the "backup" and "restore" commands differently than old versions, make sure you use the same DOS version for "restore" as you used for "backup".

Make backups small Suppose you back up your entire hard disk onto a gigantic pile of floppies (by saying "C:\>backup c: a: /s"). Suppose the first floppy in that pile gets a scratch on it. Later, when you try to say "restore", the computer notices the scratch on the first floppy, gripes at you, and refuses to restore. The entire pile of floppies has become useless, because of one scratch!

To avoid losing a whole pile of floppies from one scratch, make smaller piles instead: back up just one subdirectory at a time, so that each subdirectory gets its own pile of floppies. That way, if a floppy gets a scratch, you lose just one subdirectory instead of the whole hard disk.

Formatting during backup Before giving the backup command, you’re supposed to have a pile of blank disks that have been formatted. What if one of the disks hasn’t been formatted yet?

If your DOS is modern, the backup command will format the disk for you. If your DOS is 3.2 or earlier, the computer will gripe about the unformatted disk. If your DOS is 3.3 or 4, the computer will gripe unless you said "/f" at the end of the backup command; the "/f" tells the computer to format any unformatted disks.

Modified files If you say "/m" at the end of the backup command, the computer will back up just the files that "need to be backed up". Those are the files that have been edited or created since the last time you said "backup".

The backup you create by saying "/m" is called the "backup of modified files". It’s also called an incremental backup, since it consists of just the added files that weren’t backed up before.

Copy instead of backup

If the group of files you want to back up is short enough so that the entire group fits on a single floppy, say "copy" instead of "backup" or "msbackup", since the "copy" command is easier and more reliable.

If the group of files you want to back up is too long to fit on a single floppy, but you’re too rushed to wait for the "xcopy" or "backup" or "msbackup" command to handle a huge pile of floppies, do this instead: tell the computer to "copy" to a hard disk folder named BACKUP. Here are the details.…

If your hard disk doesn’t contain a BACKUP folder already, make a BACKUP folder by saying:

C:\>md backup

Then to back up all the files in the SARAH folder, just tell the computer to copy SARAH’s files to the BACKUP folder by saying:

C:\>copy sarah backup

That scheme works just if your hard disk is big enough to hold the BACKUP folder. If you use that scheme, you should still back up your work onto floppies occasionally, in case the entire hard drive breaks and you lose both SARAH and the BACKUP folder.

At the end of each day, you should copy all important files to the BACKUP folder. Back up all important files onto floppies once a week.

Be wary

Never trust a computer! Even if you copied up your data to a BACKUP folder and floppies, the data you backed up might be wrong, and all those copies might be equally defective! To be safer, use these tricks.…

Switch between TWO piles of floppies. The first time you copy onto floppies, use the first pile. The second time you copy (the next day or week), use the second pile instead. The next time you copy, use the first pile again. The next time, use the second pile. The next time, go back to the first pile. Keep alternating! That way, if something’s wrong with the data on today’s pile, you can go back to the other pile. Nervous institutions (such as banks and the military) have seven piles — one for each day of the week. That way, if Friday’s data is wrong — and so is the data for Thursday, Wednesday, Tuesday, Monday, and Sunday — you can at least go back to the good data you had last Saturday!

Copy your work onto paper periodically, and keep the paper copies for several weeks. The nice thing about paper is: you can see what’s on it. You don’t have to worry about the paper being secretly defective. When dealing with data, paper’s the only medium you can trust. Just don’t leave it near your dog. Lock it in your filing cabinet. (I mean the paper, not the dog.)

Where to put data files

A hard disk contains programs and data files. In a typical business, the info in the data files changes daily, but the programs remain stable. The business makes backup copies of programs monthly but backs up data files daily, to ensure the backups incorporate the latest changes.

To back up data files simply, some businesses put them all in a DATA folder (directory), backed up daily.

Sharing the disk If several employees share a hard disk, they might accidentally destroy each other’s data files. To prevent that, your business can give each employee a separate folder (directory). For example, you can put all of Fred’s data files in a folder called FRED and put Mary’s data files in folder MARY.

An even surer way to prevent employees from destroying each other’s data files is to give each employee a floppy disk. Fred gets a floppy labeled "Fred’s data"; Mary gets a floppy labeled "Mary’s data". No data files are stored on the hard disk, which contains just programs. But employees dislike using floppies, which are slower than hard disks and can’t handle long files.

Recommendation I recommend keeping things simple by creating as few folders as possible. Put the MUSIC program and all its data files in the MUSIC folder. To distinguish Fred’s music from Mary’s, have Fred begin his filenames with an F, and have Mary’s begin with M. Let Fred be responsible for backing up his own files, and Mary be responsible for backing up hers.

Subst (in DOS 3.1 & up)

If your computer has a drive B, try this nifty trick.…

Into drive B, put a disk that contains some files. Then say:

C:\>subst a: b:\

Afterwards, whenever you talk about drive A, the computer will SUBSTitute drive B instead. For example, if you say "dir a:", the computer will give you a directory of drive B.

That command is useful in the following situation:

Suppose drive A is 5¼-inch and drive B is 3½-inch. In that situation, you should buy programs on 5¼-inch floppies rather than 3½-inch, because most programs and their manuals assume you’re inserting the floppies into drive A. But suppose you make the mistake of buying a program on a 3½-inch floppy instead.

If you insert that floppy into drive B, and the program gripes at you because it insists you put the floppy into drive A, just say "subst a: b:\", and try again to run the program. When the program checks to make sure you put the floppy into drive A, the program will think you obeyed, because the drive you put the floppy in is now called "drive A".

When you finish using the "subst a:" command and want to turn your computer back to normal, delete the "subst a:" command by saying:

C:\>subst a: /d

DO.BAT

To organize the files on your hard disk, you can use many methods. My favorite is the "DO.BAT" method, which I invented. Here it is.…

How to create DO.BAT Put a file called "DO.BAT" into your DOS directory, by typing:

C:\>copy con dos\do.bat

@echo off

cd \%1

%1

cd \

dir /ad/o/w/L

If your DOS is earlier than version 3.3, change the "@echo off" to this:

echo off

cls

In classic DOS, change the "dir /ad/o/w/L" to this:

dir *. /w

When you’ve finished typing, press F6 and ENTER.

What DO.BAT accomplishes That "DO.BAT" file defines the word "do" so that if you ever type a command such as "do music", the computer will automatically go into the MUSIC folder ("cd \%1"), run the MUSIC program ("%1"), return to the root directory ("cd \"), and print a menu of all the disk’s folders ("dir /ad/o/w/L", which means "directory of all directories, in alphabetical order, displayed wide across the screen, in Lowercase letters").

If you type "do poker", the computer will automatically go into the POKER folder ("cd \%1"), run the POKER program ("%/1"), return to the root directory ("cd \"), and print a menu of all the disk’s folders again ("dir /ad/o/w/L").

If you type just the word "do", the computer will just return you to the root directory ("cd \") and print a menu of all the disk’s folders ("dir /ad/o/w/L").

So here are the rules:

Whenever you get confused, just type the word "do". It makes the computer return to the root directory and also display a menu of all the disk’s folders.

To run a program, just say "do" followed by the program’s name. For example, to run the MUSIC program, just say "do music". That automatically makes the computer go into the MUSIC folder, run the MUSIC program, then return to the root directory and display the menu of all the disk’s folders again.

Name each folder the same as its main file To let the DO.BAT program accomplish all that, you must set up your software properly. Here’s how.

For each major program you buy, create a folder.

For example, suppose you buy a program called Marvelous Music, which comes on a pile of floppies. You should create a folder for Marvelous Music. Here’s how.

First, find out the name of Marvelous Music’s main file. You can do that by reading the Marvelous Music instruction manual. For example, if the instruction manual says, "to start the program, type the word MUSIC", then the name of Marvelous Music’s main file is MUSIC.

Another way to find the name of Marvelous Music’s main file is to put Marvelous Music’s main disk into drive A and examine its directory (by typing "dir a:"). If the directory shows a file ending in .EXE or .COM, that file’s probably the main file. If the directory shows a file called AUTOEXEC.BAT, peek at what the AUTOEXEC.BAT file says (by saying "type a:autoexec.bat"); it probably mentions the main file.

Suppose you’ve discovered the main file’s name is MUSIC (or MUSIC.EXE or MUSIC.COM). Then make a MUSIC folder on the hard disk by typing "md music", so your screen looks like this:

C:\>md music

Next, put a Marvelous Music floppy into drive A. Copy all its files onto your hard disk’s MUSIC folder by typing "copy a:*.* music", so your screen looks like this:

C:\>copy a:*.* music

Put another Marvelous Music floppy into drive A, and say "copy a:*.* music" again. Do the same for each floppy, until the entire set of Marvelous Music floppies has been copied to the hard disk’s MUSIC folder.

Repeat that procedure for each application program you bought.

(Exception: some programs require you to say "install" or "setup" instead of a copy command. To find out whether to say "install" or "setup", read the manual that comes with the program. During the "install" or "setup" procedure, when the computer asks you to name the folder [subdirectory], name it the same as the main file that will be in it.)

Try it! To test whether you created the folders correctly, try using DO.BAT. Here’s how.

Say "do". If DO.BAT is working correctly, saying "do" will make the computer display a list of all your folders. For example, if you created a MUSIC folder and a POKER folder, the computer will print a list that includes "MUSIC" and "POKER".

To use MUSIC, say "do music". Then the computer will obey the DO.BAT file, automatically switch to the MUSIC folder, run the MUSIC program, and — when the MUSIC program finishes — automatically return to the root directory and print a menu of all folders, so you can choose which other application to run next.

AUTOEXEC.BAT If you wish, put an extra line at the bottom of your AUTOEXEC.BAT file, and make that line say just "do".

Then when you turn on the computer, the computer will automatically perform "do", so it will automatically display a list of all your folders. That list acts as a menu. For example, to choose MUSIC from that menu, say just "do music"; that makes the computer do the MUSIC program and then show you the menu again.

Windows The DO.BAT program manages just non-Windows programs. If you’re using mainly Windows programs, don’t bother creating DO.BAT and don’t bother putting "do" at the bottom of your AUTOEXEC.BAT file.