Introduction to MS-DOS

What is MS-DOS

MS-DOS is a "disk operating system". What that means is that when the computer system is turned on, the operating system used is based on a disk. The first operation performed by the computer is to seek that information and load it in to it's memory. There is a memory saving advantage to having a disk based operating system. The system will load only the information needed to process commands. The physical action features can be stored as files on the disk and only be loaded and performed when called for by the user.
Older personal computer systems, such as the Commodore VIC-20, Tandy TRS-80 and the Apple II series had embedded operating systems. All functions were stored in memory at all times. This was not very efficient. You also needed to know commands in the BASIC programming language to access disks and tape drives to run software. It was the native language of the machines.

The year 1981 saw the introduction of the IBM PC. The PC ran using a operating system called IBM DOS. The DOS being used was developed for IBM by a small company called Microsoft. Over time, other companies began making IBM "clones". Microsoft serviced those manufacturers by licensing MS-DOS to them. Eventually Microsoft was no longer a small company.

The operating system is the heart and soul of the computer. It, more so than the computer hardware, will determine how you interface with the machine. What the basic operating system, in this instance MS-DOS, allows you to do is instruct the computer as to what operations it is to perform. The operating system allows you to construct files, edit them, perform file maintenance operations and run application software.

A Note About MS-DOS
MS-DOS is what is called a command line operating system. What that basically means is you enter certain commands at a prompt and the system responds to your commands. If you enter commands that the system does not understand it gives you an error message. We currently are in a transitional phase of computing. Many users are turning away from command line interface systems. There is a growing migration from command line systems to GUI (Graphical User Interface) based systems. Microsoft Windows and Apple Macintosh are perfect examples of a GUI based system. Although we do not cover it here, you would do well to begin understanding how to use GUI systems. In a short time, they will be the dominant systems in use. The ease of use is much greater than a command line system. As far as application software is involved, there is less and less DOS based software on the market. Most suppliers are developing for Windows based systems.

The version of MS-DOS that we will discuss here is version 5.0 and above. We will not discuss all of the features. Also be aware that some of the utilities in later versions of MS-DOS (the 6.x versions) are not available on DOS 5.0. The versions most commonly used are from 5.0 on up. The latest version as of June 1994 is DOS 6.22. With the introduction of Windows '95, it might be a safe guess that Microsoft will not introduce a newer revision of MS-DOS.
Windows used to need DOS to run. Windows '95 does not need DOS. It is a stand alone operating system.

I Need to Get Work Done!
What Can I Do With MS-DOS?

The answer to that question is quite a bit. You will be able to create, view and edit text files. You can print out files. You will be able to save your work to a portable floppy disk. Have the ability to use the information anywhere there is a MS-DOS based computer.
You will be able to organize your information in a cohesive fashion. Make copies of your work or of your disks to save or distribute.

When you turn on the computer, it goes through a few tests and then prints the message "Loading MS-DOS" on the screen. After the computer goes through it's loading stages it will eventually come up with a prompt. The prompt in most instances will come up "c:\>" ( this is not always true because you are able to program what the prompt should be, when you install MS-DOS what we have given is what is installed.). The "c:\" informs you that your current default disk drive is drive c: and that you are in the root directory. Once you have a prompt, you will be able to start working. The prompt is where you enter your commands.

Creating and Editing Files With MS-DOS

In the stone age, people used to have to create and edit text files one line at a time. They did not have full screen editors. The EDIT command in MS-DOS today is more like running an application program than an actual command.
The command will call up the full screen MS-DOS editor. The editor is extremely easy to use. It interfaces with a mouse and has a complete drop down menu feature. You can even change the screen colors to your liking(check out the menu to see how to do this).

To use the editor to create a file you can either just enter "edit" or "edit filename.ext". If you include the name of the file that you want in the command line it will be the default save name of the file. Other wise you will be prompted for a name when you go to save the file after you have started creating it.

When you first get the editor screen you will be asked to continue or read the editor survival guide. I recommend that you do so. It will aid you in quickly learning how to use the editor.

To edit a file that is already in existence, you enter "edit filename.ext" This will load the file you wish to work on in to the editor while the editor is loading. You then can traverse the document using the standard keys. They are Page Up, Page Down, Home, and End. The Up, Down, Left and Right arrows also will move you about one step at a time.

The Page Up key will move the file up one screen position.
The Page Down key will bring the file down one screen position.
The Home key will bring your cursor to the beginning of the line it is on.
The End key will bring your cursor to the end of the line it is on.

If you do not have a mouse on the system you are using, you will need to activate the menu bar on the top of the screen. To do that, you need to hit the ALT key and then press the underscored letter of the menu you want to pull down. Most of the features you will need are in the File and Edit menu pull downs.

Using the Disk File System

A good analogy of the disk system is that of a tree. You have a root directory. This root directory is the central area where all the system files are stored and sub-directories branch off. For an example of a directory tree, see diagram 1

To Create a sub-directory of the root directory, you would need to use the command MKDIR. Proper usage of the command would be "mkdir directoryname". Once you had created the directory, you would be able to begin inserting files in to it.

To change to a particular directory, you could use the CD command. The proper usage would be "cd directory name". Once you enter the command, you are now in the directory. If you have a standard prompt, your prompt would also reflect the change. It would read C:\DIRECTORYNAME>. To go from any directory back to the root directory, you would enter the CD command with a \ such as "cd\".

Working with Files

After going through the "Using the Disk File System" section you will have some idea on organizing your information. Now once that you set up your file directories, how do you put information in to the directories. There are three basic operations that you need to be able to do.

To copy a file from one directory to another, you need to use the COPY command. The usage of the command would be "copy filename.ext c:\subdir". You would be copying filename.ext from your current directory to the directory c:\subdir. If you were not in the directory where the file was, you would enter
"copy c:\subdir1\filename.ext d:\subdir2". If you wanted to copy a file to a different drive, you would enter
"copy filename.ext a:\", where a:\ is the drive letter you are copying to.
The COPY command copies a file. The source file is left alone. Only a copy of it is made.

To move a file from one directory to another you need to use the, you guessed it, MOVE command. You would use the MOVE command exactly like the copy command. The main difference between the two is that the File is no longer in the original location. Also there are no duplicates created. It is just one file being moved about the drive.

To remove a file from the drive, you would use the DEL command. The delete command is very dangerous. It will remove your file from the filing system permanently. Use it with caution. Proper usage is "del filename.txt". Once you remove the file it is gone. There is an UNDELETE command. You need to know the first letter of the file you want to undelete. Type in "undelete". You will be told if there are any files that may be undeleted. If there are you will be asked if the file is the one you want. After you respond yes, you will be asked for the first letter of the file name.


Other Useful Commands

There are more commands that you may find of use. Here is a sampling of MS-DOS commands.

To print a text file use the PRINT command. The usage is "print filename.ext".

To make a copy of a disk use the DISKCOPY or XCOPY commands. Use DISKCOPY to make a mirror image of the disk you wish to copy. To do so enter "diskcopy a: a:". The source and destination drives must be the same drive type. Otherwise type in the as the above example with the drive letter you need. XCOPY is similar except it just copies all of the files. It is formatted in similar fashion, but you don not have to have identical drives.

When you get new disks, you should format them to be used. The command for that is FORMAT and it's usage is "format a:", where a: is the drive you want to have formatted.


To clear the screen, enter the command CLS. That is all that is needed.

To perform a status check and repair on your disks use CHKDSK. Proper usage for repair is "chkdsk /f".

To see and reset the system time Use the TIME command.

To see and reset the system date use the DATE command.


Here is a short glossary of terms that we use in this discussion of MS-DOS.

ROOT DIRECTORY: The root directory is the initial directory of a storage disk. All other directories on that disk are sub-directories of the root. It is the root of the file system tree hierarchy.
SUB-DIRECTORY: A sub-directory is a directory that is made within a directory. This forms a tree. For an illustration of a Directory tree see diagram 1.

This document was written by Ilana Giesenberg, Louis Bianchi and Dr. Bon K. Sy. We owe many thanks to the feedback provided by Bert and the students of CS101. More specific details about this document are available.

Please send suggestions and further details to:

Dr. Bon K. Sy
Queens College/CUNY
Department of Computer Science
Flushing, NY 11367
Voice: (718)-997-3500 x-3477
Fax: (718)-997-3513

Copyright 1995 - 2000