DOS Basics


At the heart of DOS there are three files. One is always called command.com. The other two are by tradition hidden and have different names depending on the DOS version. In PC-DOS as well as in DR-DOS, they are called ibmbio.com and ibmdos.com. In MS-DOS. they are called io.sys and msdos.sys.

If you put a floppy into your computer and type sys a: at the command prompt, these three files will be copied to the floppy, and the floppy will be made bootable. You can start a computer from this floppy now.

command.com is the kernel of DOS. It supports a number of so-called internal commands, like cd, dir(ectory), or del(ete). command.com is loaded into memory at startup, and all these internal commands will be available to you wherever you are.

With the internal commands you can browse directories, delete or rename files, or show the content of a file on the screen. But they are, after all, pretty limited. A lot of things in DOS is done through so-called external commands. The abovementioned sys, for example, is an external command.

An external command is nothing else but a small program. In DOS, programs are started by typing their name into the command line. To have these external commands available wherever we are, we have to set a path. In a text editor, we will create a file containing only the line

PATH A:\

and save it to our boot disk as autoexec.bat.

If you type the name of an executable file (you can omit the extension) into the command line, DOS will look for it in the current directory. If it does not find it there, it will start looking for it in the directory or directories listed in the path variable. In our case this would be the floppy.

If the name is too long or not descriptive enough for your taste, you can simply rename the file. You should better not do this with the programs coming along with a DOS installation, after all they might invoke each other, but there is no problem if it is some sort of third party utility. For example, I was never very happy with the editor of DR-DOS. So I usually copy over Microsofts edit.com, but rename it e.com to avoid conflicts with the other editor and save me typing.

If you feel uneasy renaming the file or want to change other aspects of the behavior of a command, you can always create a batch file.

This ability to create or alter commands makes DOS a lot more powerful than you would suspect at first sight. There are many utilies available that enhance your command line, and many are freeware. browse.com for example displays the contents of a file to the screen and lets you scroll through it with the arrow keys. list.com displays the contents of a directory in two columns and gives you a menu interface similar to the file open dialogs in many programs.

DOS is exactly what you make out of it.

Last modified 2005-03-07