DOS Articles
Learn how to master the basics, use directories, and install software.
Articles From DOS
Filter Results
Article / Updated 01-24-2017
You can protect floppy disks in such a way as to prevent yourself or anyone else from modifying or deleting anything on the disk. When a disk is write-protected, you cannot alter, modify, change, or delete anything on that disk. And you cannot accidentally reformat it. You can read from the disk and copy files from it, but changing the disk — forget it! To write-protect a 5-1/4-inch disk, grab one of those tiny tabs that came with the disk in the box. Peel the tab and place it over the notch in the disk, which should be on the lower left side as you insert the disk into the drive (see Figure 1). With that notch covered, the disk is write-protected. Figure 1: Write-protecting a disk prevents changes to your data. To write-protect a 3-1/2-inch disk, locate the little sliding tile on the lower left side of the disk as you slide it into the drive. If the tile covers the hole, then you can write to the disk. If you slide the tile off the hole (so that you can see through it), the disk is write-protected (see Figure 1). To un-write-protect a 5-1/4-inch disk, peel off the little tab. Although this action renders the disk sticky, it's a livable problem. You can un-write-protect 3-1/2-inch disks by sliding the tile over the hole. Reformatting disks Disks must be formatted before DOS can use them, and after they're formatted, you can reformat them. You can format them under two circumstances: when you want to totally erase the disk and all its data or accidentally. Obviously, you shouldn't erase a disk you don't want to erase. All the data on the disk goes bye-bye. The only way to avoid this situation is to be careful: Check the disk with the DIR command first. Make sure that it's a disk you want to reformat. Don't be afraid to erase disks. You may have stacks of old disks that you can reformat and use. The data on them may be old or duplicated elsewhere, so reusing the disk is no problem. Here's the FORMAT command you want to use: C> FORMAT A: /Q That's the FORMAT command, a space, and then A and a colon, which directs the FORMAT command to format a disk in drive A. That's followed by another space and a slash-Q. That line tells DOS to Quickformat the disk. It's very fast. If DOS refuses to Quickformat the disk, try this FORMAT command: C> FORMAT A: /U This command is the same as the last one but with a slash-U rather than a slash-Q. This command tells DOS to unconditionally format the disk. It takes longer than a Quickformat, but it generally works. If you want to reformat a disk in drive B, substitute B: for A: in these examples. Note that you cannot Quickformat a disk to a different size. In fact, you shouldn't be reformatting disks to a different size anyway. If you must, use the /U option, as just shown. Quickformat only newer disks. If a disk has been sitting around awhile, use the FORMAT command without the /Q. Although that method takes longer, the FORMAT command does a better job to ensure that the disk is still usable. After formatting a disk, you see a list of statistics. If one of the statistics mentioned is xxxx bytes in bad sectors, you have a bum disk on your hands. If this is the case, then just toss it away. If you still have the receipt and the store said that the disks were "fully guaranteed," you can try to get your money back. Good luck! You can recover accidentally reformatted disks by using MS-DOS 6.2 and higher. Duplicating disks (the DISKCOPY command) To make a duplicate of a file on disk, you use the COPY command. To make a duplicate of a floppy disk, you use the DISKCOPY command. DISKCOPY takes one floppy and makes an exact duplicate of it, even formatting a new disk if it was previously unformatted. Here are two things you cannot do with the DISKCOPY command: Use DISKCOPY to create two disks of different sizes or capacities. Use DISKCOPY with a hard disk or a RAM drive. (If you don't know what a RAM drive is, go to the refrigerator and reward yourself with a cool, carbonated beverage.) When you copy disks, DOS refers to the original disk as the SOURCE. The disk to which you're copying is the TARGET. To make a copy of a disk, first write-protect the original, the source. Put your write-protected original in drive A. Close the drive's door latch for a 5-1/4-inch disk. Type this command at the DOS prompt: C> DISKCOPY A: A: That's DISKCOPY, a space, and then A: twice (which means that drive A is mentioned twice and separated by a space). Press Enter and DOS examines the disk, spews out some technical mumbo jumbo, and then Reading from source diskette . . . The drive churns away for a few moments. Then, you're asked to insert the target: Insert TARGET diskette in drive A: Press any key to continue Remove the source disk and insert your duplicate disk. Close the door latch if you have a 5-1/4-inch disk. Press Enter. Writing to target diskette . . . Take a few seconds to put the original (the "source") back in a safe place. When the operation is complete, you can use the duplicate rather than the original. When the operation is complete, DOS asks whether you want to use DISKCOPY again. Press Y if you do or N if you don't. In MS-DOS 6.2, after the copy is complete, you're asked whether you want to make another duplicate of the same disk — another TARGET. Press Y if you do or N if you don't. Then you're asked whether you want to copy another disk (another SOURCE). Press Y if you do or N if you don't. You can use DISKCOPY in your drive B by substituting B: for A: in the preceding command. You can use the following DISKCOPY command if and only if your drives A and B are of the same size and capacity: C> DISKCOPY A: B: This command is faster because you don't have to swap disks. If the target disk is unformatted, DISKCOPY formats it. If it's already formatted, DISKCOPY replaces the original contents with the copy. The DISKCOPY command is the only accurate way to duplicate a disk. Even the COPY command cannot always make a full copy of all the files on a disk. You may be asked to swap the SOURCE and TARGET disks a few times. This process can be maddening. If it bothers you, consider updating to MS-DOS 6.2 or higher, where they (finally) stopped the DISKCOPY disk-swapping madness. Use DISKCOPY to copy disks for only your use, not for friends — it's illegal to copy licensed programs for others.
View ArticleArticle / Updated 03-26-2016
Computers are supposed to make life easier, not harder. Hard disk management is simply the way you use files on a hard drive. This concept involves some organization, and understanding that organization makes computing much easier. What is a subdirectory? A subdirectory is workspace on a disk. It's almost like a disk within a disk. You can copy files and programs into a subdirectory or workspace, and you can use DOS commands. The advantage to subdirectories is that you can store information in a subdirectory and keep it separate from other files on the same disk. That keeps the disk from getting file-messy. Any disk can have subdirectories, though they're used primarily on hard drives to keep files separate and your programs organized. Rather than let you suffer through a hard drive with bazillions of files all in one place, subdirectories enable you to organize everything by placing information in separate areas. Subdirectories could be called just directories. The prefix sub means "under," just as submarine means any large naval vessel a marine is standing on. All the workspaces on a disk are really directories. However, when you refer to one directory in relation to another, the term subdirectory is used. A subdirectory is the same thing as a folder in Windows terminology. All the directories on your disk create or are organized into what's called a tree structure. The root directory Every disk you use under DOS has one main directory, called the root directory. The root directory (often just called the root) exists on all DOS disks; it happens naturally, created when you first format the disk. The symbol for the root directory is the single backslash (). DOS uses this abbreviation — shorthand — in reference to the root directory. This symbol also plays an important role in the pathname, which is like a long filename. Additional directories on a disk are subdirectories under the root directory. They branch off the root like branches of a tree. In fact, if you map out the directories on a disk and draw lines between each subdirectory, it looks like a family tree of sorts, as shown in Figure 1. Figure 1: Subdirectories branch from the root, creating a family tree of sorts. The FORMAT command is used to prepare disks for use under DOS. In the formatting process, FORMAT also creates the root directory. Whenever you're using a disk, you're logged to, or currently using, a directory on that disk. That funny thing To find a subdirectory on a disk, you use the DIR command. Directories are listed there, along with other files. The way you identify a directory name is by the thing shown after its name (where other files would list their file size in bytes). For example, consider this output from the DIR command: Volume in drive C is DOS HAPPYVolume Serial Number is 16CE-9B67Directory of C:123 03-18-96 9:33pCOMM 08-07-96 9:37pDOS 09-20-97 10:52pGAMES 09-22-97 5:18pWP60 09-21-97 5:12pAUTOEXEC BAT 574 09-05-97 10:04aCOMMAND COM 54,928 08-11-93 6:20aCONFIG SYS 464 07-25-97 10:20aWIN20 386 9,349 08-11-93 6:20a 9 file(s) 65,315 bytes 36,468,736 bytes free The "files" 123, COMM, DOS, GAMES, and WP60 are actually directories on disk. At the top of the output in this example, Directory of C: tells you that you're looking at a directory of drive C (that's the C:), the root directory (shown by the backslash). The entries in the listing are all subdirectories of the root directory. Subdirectories appear in the DIR command's listing because they're part of your disk, just like files. In fact, directories are named just like files and can even have an extension like a file. The C: is actually a pathname. Commas in big numbers appear only if you have MS-DOS 6.2 or later. Early versions of DOS don't use commas, which is just DOS's attempt to overwhelm you with large values.
View ArticleArticle / Updated 03-26-2016
No one but a tech-head really likes to install software. A techie takes pride in trying to set the thing up without first reading the manuals. Installation means copying the program you've just bought from floppy disks to your computer's hard drive. It also means more, typically configuring or setting up the program to work with your particular PC, printer, and the rest of that stuff. That is why installation is best left up to your local computer guru. If not, you can follow the outline in this article. Because each computer program installs itself differently, this information is general It gives you a broad idea, though, of the task you're about to undertake. Read me first! Computer manuals and those national sweepstakes with you-know-who's picture on the envelope both have something in common: You get lots of little pieces of paper and instructions for the interesting things you must do. Computer manuals are easier to deal with. Seriously. You have no need to hunt through everything, fill out various forms, or paste Uncle Ed's picture inside the TV set. Just look for a sheet of paper somewhere that says "Read me first!" Read it, and you're on your way. The installation program You install a program by sticking Disk 1 into your PC's first floppy drive (drive A) and then running the installation program. If the disk doesn't fit in drive A, stick the disk into drive B and substitute B for A in the following instructions. The name of the installation program is usually Install, although Setup is also popular. Two steps are involved here. The first is logging to drive A. Basically, after sticking Disk 1 into floppy drive A (and closing the drive door latch for a 5-1/4-inch disk), you type C> A: Typing A and a colon logs you to drive A. Press Enter. Next, you enter the name of the installation program. This name is probably listed in the manual, on the disk label, or on the "Read me first!" sheet of paper, or else that paper tells you where to find these instructions. Be wary! Even though installing the program is the first thing you ever do with it, it's rarely the first chapter in the manual. For example, if the name of the installation program is INSTALL, you type A> INSTALL Press Enter. Sometimes, the installation program is called SETUP. If so, you type A> SETUP Press Enter here, too. Don't forget to read the information on the screen! It's important, especially for an installation program. In fact, many "experts" usually screw up software installation by not reading the information screens. Follow the instructions closely. The location The first thing the installation program asks you is "Where do you want to put me?" Dumb question. You want to put the program on your computer. The application needs its own workspace on your hard drive. This space is referred to as a subdirectory. Only advanced users may have some special scheme or plan in this instance. You should accept whatever suggestion the installation program makes — it's probably a good one. Configuring a computer application Configuration is the stupidest part of setting up a computer application. This part is where the program asks you information about your own computer: "What kind of printer do you have? What kind of display or monitor is attached? How much memory do you have? Do you have a mouse?" These questions are ridiculous! After all, the computer program is asking you those questions, and it's already inside the computer, where it can look around more easily than you can. Still, you may have to tell the computer what it has (which, again, is like asking other people how old you are at your next birthday party). These questions can be difficult. If you don't know the answers, grab someone who does. Otherwise, guess. The default or automatic selection options tell the program to guess on its own, so if they're available, select them. An important item to select is a printer driver, which is a fancy way of telling the application which printer is manacled to your PC. Look for your printer's name and model number listed. If it's not there, select Dumb or Line printer (and then go to your dealer and beat up the guy who sold you the printer). READ.ME file Finally, last-minute instructions or information are offered in a special file on disk. It's given the name README, READ.ME, README.TXT, or README.DOC. Good installation programs ask you whether you want to view this file. Say yes. Look through the file for any information that applies to your situation. A utility is usually offered with a program to provide automatic viewing of the READ.ME file. If not, you can view it by using this DOS command: C> MORE < READ.ME That's the MORE command, a space, a less-than sign (<), another space, and the name of the READ.ME file. If the file is named just README, type it without a period in the middle. Using your new software After you run the install or setup program, you get to use new software. As a suggestion, after installing any new software, reset your computer. Press Ctrl+Alt+Delete or punch your computer's Reset button. (Some installation programs may do this part automatically.) Do not reset your computer if you're using Windows! In that case, just close the DOS prompt window and start it up again to begin using your software. To use the new program, type its name at the DOS prompt. The program's name should be in the manual or on a quick-reference card. You're doing this step just to make sure that the program works as advertised. If something doesn't work, don't be too quick to blame yourself. Programs have bugs. Keep in mind that the features of a new program aren't immediately obvious.
View ArticleArticle / Updated 03-26-2016
You get work done on a computer by running a program. If you're lucky, somebody has set up your computer so that it automatically runs the program you need. Turn on the PC, and — zap! — there's your program. The only time you have a problem is when something goes wrong and the program crashes or doesn't turn on like it's supposed to. (Or, while you were at lunch, Petey from the mailroom came in and played games, leaving you with a C> on your screen to puzzle over.) If you're on your own and nothing seems to happen automatically, you need to start a program yourself. Here's how: First, you need to know the program's name. Then, you type that name at the command prompt. For example, WordPerfect is named WP. To run WordPerfect, you type WP at the DOS prompt and then press Enter: C> WP To run Lotus 1-2-3, you type 123 at the DOS prompt and press the Enter key. You can also run Windows programs from the DOS prompt if you are running Windows. For example, to start the Calculator program, type CALC at the DOS prompt: C> CALC Press the Enter key, and the Calculator program pops up on-screen. (Your DOS prompt window doesn't go away; just click it with your mouse to continue using DOS.) If your computer is set up to run some sort of menu system, try typing MENU at the DOS prompt to run it. Other terms for running a program include loading a program, launching a program, and starting a program. Alas, you can't run Windows programs from a DOS prompt in Windows 3.11. If you try, the computer informs you that the program requires Microsoft Windows. Under DOS, all program files are named with a COM, an EXE, or a BAT ending (called a filename extension). Don't bother typing that part of the name at the DOS prompt — and you don't have to type the period that separates COM, EXE, or BAT from the file's name. Using the DIR command The most popular DOS command is DIR, which displays on-screen a list of files on a disk. This command is how you can find which programs and data files are located on a disk. DIR is especially helpful if you're missing something; it helps you locate that document or spreadsheet you were recently working on. To see a list of files, type DIR at the DOS prompt and press Enter: C> DIR If the list is too long, you can type the following DIR command: C> DIR /P The /P makes the listing pause after each screenful of files. To see a list of filenames only, type the following DIR command: C> DIR /W The /W means wide, and it gives you a five-column, name-only list. If you want to see the files on a floppy drive, follow the DIR command with the letter of the floppy drive: C> DIR A: In this example, DIR is followed by A:, indicating that the command should list files on any disk in that drive. (You should have a disk in the drive before you use that command.) If you want to find out which files are on drive B, for example, substitute B: for A:. You can use the DIR command to find files by name as well as to locate files in other subdirectories on the disk. The output of the DIR command shows a list of files on your disk. The list has five columns: the file's name, the file's extension (part of the name), the file's size (in bytes or characters), the date the file was created or last modified, and the time of the last modification. In Windows, the DIR command's output has size columns. The final column displays the long version of the filename (if there is one). Looking at files Two types of files are on a PC: English and Greek. You can use the TYPE command to display any file's contents. You can read the ones in English (or ASCII). The files in Greek — they're actually in secret computer code, but it may just as well be Greek — are program files or data files or any other stuff you can't read. To look at a file, you must know its name. (If you don't know the name, you can use the DIR command; refer to the preceding section.) You type the file's name after the TYPE command and a space: C> TYPE FILENAME.EXT Press Enter to see the contents of the file, which is FILENAME.EXT in the preceding example. To see the contents of the LETTER.DOC file, for example, you would enter the following command: C> TYPE LETTER.DOC The file is then displayed on-screen. A simple way to view — and edit — text files is to use the DOS Editor. If you get a File not found error message and you're certain that the file exists, you probably mistyped its name. Reenter the command and check your typing. Alternatively, you can use the DIR command to verify that the file exists. Text files usually end with TXT in their filename. The DOC ending is also popular, though DOC doesn't necessarily mean that it's a text file. Some common text filenames are READ.ME and README and sometimes README.TXT. You can't see all files, even though your application may display them perfectly. These "Greek" files typically contain special codes and functions for the computer, stuff that the program eats and then spits back at you as non-Greek information. Unfortunately, the TYPE command just isn't that smart.
View Article