Survival tips for DOS haters. (Column)
by Tony Roberts
Each year, new levels of insulation are erected between DOS and the average computer user. Batch files, menu programs, shell programs, and graphical user interfaces do what they can to eliminate the need for us to communicate with our machines at the DOS prompt.
These advances have made computers less frightening and less frustrating for users who are reluctant to sit down at the keyboard. (Those of us who are accused of living only to use computers do recognize that there are those who use computers only to earn a living.)
Even if you generally manage to avoid the DOS prompt, a little DOS knowledge will help you when you do face the dreaded C prompt. These tips should get you started.
Slashes (/) vs. backslashes (/). If you're confused about which slash to use when typing at the command line, keep in mind that backslashes are used as part of the filename path. Regular slashes are used to specify switches, or options for how a program should be run.
Chkdsk. If you use a hard drive, run the disk check utility every time you reboot your system. Include the command Chkdsk in your system's autoexec.bat file. Chkdsk determines if the disk's File Allocation Tables are intact and whether each file is in its proper place on the disk. If errors are reported, deal with them immediately--it takes only a few seconds. Well-maintained disks are much less prone to serious problems.
Dir. You're probably accustomed to using the Dir command to generate directories, but there are ways to use it more effectively. If your listings scroll past before you can get a good look at them, use the command Dir/p to pause the display after each screenful. If you know you're looking for a file that begins with the letter s, you could use the command Dir s*.* to instruct Dir to show you only files that begin with the letter s.
If you're using DOS 5.0, try Dir's other switches to sort the directory display the way you like it. Dir/od sorts by date. Dir/s displays the current directory and all its subdirectories. If you have one series of Dir switches you use all the time, instruct your system to use those switches by default by adding a line to the autoexec.bat file. I use the command Set dircmd=/l/ ogn to have my directories display in lower case, sorted by name, with sub-directories listed first.
Edit. Often, you need to make quick changes in a file--such as autoexec.bat or config.sys--but you don't need all the power of a word-processing program. Use DOS 5.0's Edit command. This is an easy-to-use text editor that's always handy. Don't worry; Edit is nothing like its older brother Edlin, a line-based text editor that has the distinction of being one of DOS's most confusing programs.
Format. Let's face it. Formatting disks is no picnic, but each of us has to deal with this chore. DOS 5.0 makes formatting easier than ever, so acquaint yourself with the switches that are appropriate for your size and type of disk. For example, the /f switch allows you to specify the size of the disk being formatted. If you have a 720K disk in drive B, use the command Format b: /f: 720.
DOS 5.0's Format command is more forgiving than its predecessors. Now you can Unformat a disk if you realize quickly enough that you formatted the wrong disk. The Format command saves enough information about the disk to reconstruct it, should the Unformat procedure be necessary. This slows down the formatting, though, so if you're formatting a brand-new disk, save some time by executing the Format command with the /u switch. The u stands for unconditional. With this switch, DOS formats without saving data that might be useful in an Unformat operation.
Copy/Xcopy. Everyone copies files now and then. Usually, it's just a file or two from one disk to another. This is pretty straightforward, and the Copy command handles it well. If your copying becomes more complicated, however, look to the Xcopy command.
If you're copying several files, as with Copy*.* a:, Xcopy is faster because it reads and writes in batches of files rather than file by file. If you need to be selective about which files you copy, it's Xcopy to the rescue again. Xcopy includes switches that allow you to copy files based on the date the file was last modified or based on the status of the file's archive bit. The archive bit is turned on every time a change is made in a file. If you use Xcopy to copy changed files (those with the archive bit on), you provide yourself with a small backup system.
Help. Finally, one of the best things about DOS 5.0 is that it includes help for most commands. With this feature, you don't have to scurry for a manual to perform an unfamiliar routine. Typing help xcopy, for example, provides a screenful of information about how to use Xcopy and all its switches.
Call for help when you need it, and you'll be able to get back to your menu, shell, or graphical interface in no time.