Recently, I was the featured speaker for a TechProGuild Guild Meeting. The topic was ”What DOS can still do for you.” I didn’t expect it to be a busy meeting; after all, who uses DOS anymore? Was I ever wrong! What I anticipated would be a slow Guild Meeting quickly turned into a heated operating system debate. During the course of that meeting, several good points were made on both sides. In this Daily Drill Down, I’ll attempt to explain why I believe DOS will be around for quite some time.

A brief history of DOS
DOS has evolved a lot over the years. It was originally released in the early 1980s as a basic operating system. DOS served as a platform for launching programs and as a means of formatting disks and copying files. For years, DOS fit on a single 5.25-inch, 360-KB floppy disk. As time went on, the operating system grew in size as more utilities were added to the basic DOS environment. However, the basic DOS files remained pretty much the same through version 6.22.

DOS 6.22 was the last true version of DOS. However, Windows 95 and Windows 98 both run on top of a hybrid version of DOS. In Windows 9x, the basic DOS files IO.SYS, MSDOS.SYS, CONFIG.SYS, and AUTOEXEC.BAT have all been rolled into the IO.SYS file. MSDOS.SYS still exists, but its purpose has changed. The modern MSDOS.SYS file controls Windows boot options. CONFIG.SYS and AUTOEXEC.BAT still exist but are provided for backward compatibility only. Windows 9x can function without CONFIG.SYS or AUTOEXEC.BAT because the necessary CONFIG.SYS and AUTOEXEC.BAT files are already incorporated into IO.SYS. COMMAND.COM still remains very similar to the COMMAND.COM file found in legacy DOS versions.

Windows NT and Windows 2000 are the only members of the Windows family that don’t run on top of DOS. Even though these operating systems don’t require DOS, they still provide a command prompt window that acts like a DOS environment.

So what can DOS do for me?
Now that I’ve talked a little bit about the history of DOS, you may be thinking, “Big deal. What can DOS do for me?” Well, DOS still has many uses, especially for diagnostic and recovery purposes. In the sections that follow, I’ll discuss some common uses for DOS in the modern world.

Automating tasks
One of the biggest uses for DOS in the modern world is task automation, in the form of batch files. Although Windows NT and Windows 2000 provide you with scripting tools, it’s often easier to use a batch file to do the same job. This is because using a batch file keeps you from having to learn a new programming language (assuming you already know how to write a batch file). More importantly, though, batch files are universally compatible with all versions of DOS and Windows.

Batch files can handle a wide variety of tasks. They can do everything from preparing the operating system’s environment before a program runs to cleaning up your hard disk. It’s true that the Windows 2000 scripting tool can do a lot of stuff that a normal batch file can’t (such as manipulate user accounts). However, a batch file can handle all but the most demanding scripting tasks.

Easy file manipulation
Another common use of DOS is easy file manipulation. For someone who’s a quick typist, it’s still faster to do some tasks at the command line than through Windows Explorer. This is especially true for situations where you can use wildcards. For example, suppose you need to copy to another directory all the files in a certain directory that start with A. In a pure GUI environment, you’d have to open Windows Explorer, switch to the directory, set Windows Explorer to sort the files alphabetically, select the files you want to copy, choose Copy from the Edit menu (or press [Ctrl]C), navigate to the destination directory, and finally choose Paste from the Edit menu (or press [Ctrl]V).

In a DOS environment, this task is much quicker. Simply open a command prompt window and type the following command:

If you’re still not convinced, suppose you need to clean up your hard disk and want to erase all the files in a given directory ending in the .tmp extension. In a GUI environment, you’d have to open Windows Explorer, switch to the directory containing the files, tell Windows Explorer to sort by file type, select the files you want to delete, press [Delete], confirm that you really do want to delete the files, close Windows Explorer, and empty the Recycle Bin.

If that sounds like too much work, there’s always the DOS alternative. Simply type this command in the MS-DOS prompt window:

Hardware troubleshooting
Okay, so DOS is a good shortcut for those of us who are fast typists, but I still haven’t addressed the question of whether DOS is truly useful. Because of its simplicity, DOS is especially useful for troubleshooting hardware or for correcting software problems. Think about Windows for a moment. Windows uses thousands of files and keeps dozens of those files locked at any given time. Windows also initializes device drivers for all of your hardware at boot time. This means that by the time you get to a point within Windows where you can actually begin troubleshooting, Windows has taken over half your system. This situation is a little better in Safe Mode, but you’re still far from having total control over the system.

Now, imagine troubleshooting a problem in a DOS environment. For starters, not a single file is locked by the operating system. This means that if you need to replace a damaged system file, you’re free to do so. Troubleshooting hardware is also much easier in DOS, because DOS is a clean environment. DOS doesn’t load any hardware device drivers unless you tell it to. This means that you’re free to diagnose a piece of hardware without having other device drivers interfering with what you’re doing.

For example, many times I’ve had to upgrade a computer from Windows 3.1 to Windows 98. Of course, these systems had older, non-plug-and-play hardware. During these upgrades, it was very common for Windows 98 to misidentify the system’s network card or to assign it the wrong system resources. Because many of these cards didn’t have jumpers, I couldn’t simply look at the jumpers to get the card’s settings. The only thing I could do was boot the system in DOS mode and load the card’s DOS drivers. After doing so, I used a hardware utility to identify which resources the card was using. Only after I identified these resources was it possible for me to go into Windows and use Device Manager to manually set Windows to use the correct resources for the card.

Many of the best hardware diagnostic tools run exclusively in DOS mode. I use a tool called DOSDIAG, which I downloaded from a shareware Internet site. There are dozens of these tools available for download. These tools tend to work best under DOS because Windows-based diagnostic tools make one dangerous assumption: They assume that Windows is functioning properly. Therefore, Windows-based diagnostic tools may falsely report a Windows problem as a hardware problem.

A DOS-based diagnostic tool, on the other hand, is more reliable. If it indicates there’s been a hardware failure, that’s probably the case, because the tool isn’t affected by operating system problems. While it’s true that a qualified technician can usually tell the difference between an operating system error and a hardware error, it takes up precious time to make that distinction. When Windows has only minor damage, such as one corrupted file, an incorrect DLL version, or a slightly damaged registry, it can often be difficult to distinguish between a hardware and a software failure.

Virus recovery
DOS can also be useful for virus removal. Everyone knows that you’re supposed to keep up-to-date antivirus software running on your system at all times. In reality, though, this isn’t always the case. It’s very easy for a system that isn’t running antivirus software to contract a virus that can prevent Windows from loading. In such a situation, you’re limited to using DOS to fix the problem.

Fortunately, there are still some good DOS-based antivirus programs out there. One of my favorites is F-Prot. It’s well written, accurate, and with a little tweaking, it will fit on a floppy. Once you have a DOS-based antivirus program on a floppy, it’s easy to boot your system with a clean DOS disk and run the antivirus program directly off the floppy to fix the problem. You can download a copy of F-Prot from theF-Secure Corporation Web site .

Hard disk repairs
Yet another use for DOS is taking care of hard disk repairs. As with a virus, it’s possible for severe hard disk corruption to make your hard disk unable to load Windows. If this happens to you and you don’t want to run FDISK (which is still a DOS function) on your drive, you’ll have to use DOS to repair the problem.

One way is to run the Windows version of SCANDISK off a floppy in a DOS environment. Make sure you use the Windows-compatible version of SCANDISK from either a Windows 95b or Windows 98 start-up disk. A true DOS version of SCANDISK will remove long filenames. If SCANDISK isn’t quite powerful enough to fix the problem, there are plenty of other DOS-based disk repair programs. Many are available for free download from some of the shareware Internet sites. Some versions of the Norton Utilities include copies of Norton’s Disk Doctor and Norton’s Disk Editor that can be run from a floppy in a DOS environment.

Quick system access
As you can see, DOS comes in handy as a shortcut for all of those mouse clicks, and in diagnostic and recovery situations. However, DOS can also be used to provide you with a comprehensive view of your system’s configuration. For example, typing the command NET USE in an MS-DOS prompt window will display all your mapped network drives and printers.

Another handy command is IPCONFIG or WINIPCFG (depending on which version of Windows you’re using). You can issue the command to display your computer’s TCP/IP configuration. And speaking of TCP/IP, some of the most useful TCP/IP diagnostic commands were designed to work through DOS. These include such commands as PING, ROUTE PRINT, and ARP.

What about Windows 2000?
Okay, so I’ve talked about all the useful stuff that DOS can do. But the fact remains that DOS is a dinosaur. What about the future of DOS? As you probably know, Windows 2000, the latest version of Windows, runs on top of the Windows NT kernel instead of DOS. However, Microsoft must realize that DOS is still useful, because not only does Windows 2000 include a command prompt window that functions like DOS, but it also includes a new feature called the Recovery Console. The Recovery Console is a DOS environment that functions outside the Windows 2000 graphical user interface. It allows full read-and-write access to FAT and NTFS partitions. It can also access RAID arrays and mirror sets. The Recovery Console even provides a limited ability to interact with the Windows 2000 drivers, services, and security system. If you’re interested in knowing more about the Recovery Console, check out “Fix your Windows 2000 system quickly with the Recovery Console.”

In this Daily Drill Down, I’ve listed reasons why I believe that DOS will be around in at least some form for a long time to come. I’ve also examined areas in which DOS still comes in very handy.

Brien M. Posey is an MCSE who works as a freelance technical writer and as a network engineer for the Department of Defense. If you’d like to contact Brien, send him an e-mail. (Because of the large volume of e-mail he receives, it’s impossible for him to respond to every message. However, he does read them all.)

The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.