browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

DOS: Getting Started

Posted by on May 20, 2010

What Is DOS?

Today, the DOS OS is basically null and void as a stand alone OS. However, when you click on the “Run” option in Windows or type “CMD” in the windows search box on Windows 7, your basically going into a DOS Prompt command interface. From this you can do lots of things with your system, so here’s some limited information to help you along. I’ll have 3 sections to this, just like I did with the Unix info, of course Unix/Linux is still growing and developing, whereas DOS is pretty much stagnant these days.

You’ll also note that I have reference to “Older” technology, such as 5.25 floppies (doubt you could even find one these days) but it helps to understand the growth and development of the DOS operating system, so I left the information in, more for historical reasons than any real need knowledge to run DOS commands.

DOS stands for Disk Operating System. An operating system is a special set of programs that let you (or an application program) use and manage your computer’s resources. Since many of the more complex tasks involve managing storage and retrieval of information on disk, the operating system takes its name from that resource.

PC-DOS and MS-DOS are variations of the same operating system written for IBM PCs and compatible computers. (They are both referred to as "DOS" in the rest of this document.) Other computers have different operating systems. Programs written to work with PC-DOS or MS-DOS will not run on machines such as the Apple Macintosh that use other operating systems.

What Does DOS Do?

PC-DOS manages the flow of information between a computer’s major components. Listed below are descriptions of the types of components that make up your computer:

Input Devices

These include the keyboard and the mouse.

Output Devices

the screen, CRT (Cathode Ray Tube), or VDT (Video Display Terminal).

Central Processing Unit

The CPU is the microprocessor chip that is the "brain" of the computer. The early PCs used an Intel 8088 processor. Newer chips such as the 80286, 80386, and 80486 do more tasks in less time.

Internal Memory

This memory takes two forms. ROM (Read Only Memory) contains basic permanent instructions that tell your computer how, for example, to load DOS. You cannot change information located here. RAM (Random Access Memory), however, is the temporary storage space that contains instructions and information your computer is using during your current work session. Be aware that the information in RAM disappears when you shut off your screen.

The capacity of this storage space is measured in bytes. One byte equals approximately one character of the alphabet. RAM in most PCs is at least 640KB. (1 KB or kilobyte is 1,000 characters of information.) Many new machines have over 1MB. (1MB or megabyte can store 1 million characters.)


To keep information even after you turn the computer off, you must store it or save it, usually on disks. Disks may be removable (floppy) or fixed (hard). Floppy disks, also called diskettes, have different physical sizes (5.25", 3.5") and different storage capacities for data (360KB, 720KB, 1.44MB). Hard disks, because they are sealed, run faster and can store more data than floppies. They may contain 10MB, 20MB, 40MB, or more of data.

Using Floppy Disks

Since they are removable, floppy diskettes are vulnerable to dust, heat, damp, magnetism, and rough treatment. Always keep diskettes in a cover and, if possible, in a closed diskette box. Label diskettes using a felt-tip marker, rather than a ball-point pen or a pencil, and avoid pasting new labels over old ones, since stacked labels can come loose and get jammed inside the drive.

Floppy diskettes have write-protect notches or tabs. You can cover the notches or open the tabs to prevent you or anyone else from erasing or saving data onto the disk by accident. This is a good way to protect original software or important data from being destroyed.

Starting the Computer

When you turn on your computer, instructions in ROM tell the computer to load (or boot) DOS from a disk drive. Diskette drives are normally designated A: or B:, and the hard drive is usually C:. The computer searches for DOS on drives A: and B: first. If it’s not there, the computer looks for it on drive C:.

To load DOS from a diskette, insert the DOS system diskette in the A: or B: drive and turn on the machine.
To start the computer from a hard disk, just turn on the machine.

Once DOS is loaded, you may have the option of setting or changing the date and time. To skip this step for now, press <Enter> twice.

You should then see the DOS prompt, which ends in >; for example A:\>. The flashing cursor following the prompt tells you that DOS is ready for you to type your DOS commands.

Restarting the Computer

Sometimes an error in an application program you are running causes the computer to cease operating correctly. The computer may appear to "lock up" and not accept anything you type. In that case, press Ctrl-Alt-Del (hold down the Ctrl key & the Alt key, then tap the Del key) to restart or "reboot" your computer. If that doesn’t work, you may have to turn the power off, wait a few seconds, and turn the power on again. Remember that you will lose all data that wasn’t saved at the time of the reboot.

Using DOS Commands

The general pattern for DOS commands is command target /option(s).

For example, dir a: /w is a valid command. The dir command displays a directory of a disk’s contents. The target for the action is the A: drive. (The drive name must end in a colon when used in a command.) The /w option causes the command to print a wide listing.

The command is required, but the target and the option are not. One or more spaces separate the command from the target and the option. The command itself cannot contain spaces.

DOS commands are not case-sensitive. They may be typed in upper or lower case letters or a combination of both. DIR A:, dir A:, and dir a: are all acceptable.

Type the DOS command at the prompt. You must then press the <Enter> key for the computer to execute the command.

Displaying the DOS Version

Type ver at the prompt to display the version of DOS the computer is running. Different versions of DOS have different capabilities and commands available. Later versions of DOS offer more functions than earlier ones. If you plan to install software, use this command to check whether your version matches the one required by software. Also, when you report a problem with your computer, it is useful to know what version of DOS your computer is running.

Changing the Date & Time

Most computers have a battery-powered clock/calendar that maintains the current date and time even when the power is turned off. If your computer does not have this feature, you should enter the date and time each time you boot your computer. This is a good practice because DOS stamps an electronic date and time on files when they are first created. For example, when you save a document with your word processing software, an electronic date and time is attached to the filename. Unless you keep the correct date and time , this record-keeping feature will be useless.

Enter date to display the date. If the date is correct, just press <Enter>. If it is incorrect, enter the correct date (mm-dd-yy) and press <Enter>.

Enter time to display the time. If the time is correct, just press <Enter>. If it is incorrect, enter the correct time (hh:mm:ss) and press <Enter>.

Clearing the Screen

Enter cls to clear the screen except for the DOS prompt.

Preparing Disks for Use

The format command "initializes" a new diskette and prepares it for use with a specific operating system.

The format command may be performed on new or used diskettes. Warning: This command will destroy any data already on the diskette. For this reason, you almost never want to format your hard disk, drive C:.

Type format, then specify the drive which contains the diskette to be initialized. For instance, to execute a basic format on the diskette in drive B:, type format b:

Note: A 3.5" diskette formatted for use with PC-DOS will fit in a Macintosh 3.5" disk drive but can be read only by a Macintosh operating system with appropriate conversion software; likewise, a PC which accepts 3.5" Macintosh-formatted diskettes must have the ability to read Macintosh formatting.

Reporting on Disk Status

The chkdsk command displays an analysis of the target disk. The report includes disk space used, disk space available, and any areas on the disk that cannot be read. In addition, the last two lines disclose how much space is available in RAM for application programs.

The command chkdsk a: inspects the diskette in drive A:. To check the hard drive, enter chkdsk C:.

You should perform this command regularly if you want to be warned about errors that may eventually threaten the disk’s ability to read your stored data.

You should also be making regular backups, which are copies of your important files. These can be made on removable diskettes, on a special tape drive or, if your computer is connected to a local area network, backups can be made to the network file server. If you regularly perform backups of your work, this precaution can save you from losing your work in the event that your computer develops mechanical or software problems.

Getting Help

Version 5.0 of DOS provides online information about each of its commands. Type help to get an alphabetic listing of all the commands together with a brief description about each command’s function.

If you want help with a particular command, type help followed by the command. For example, help format will give you some technical information about formatting.

Disk File Structure

We’ve referred to your disk as a storage space for data. You can think of it as a filing cabinet containing your files (programs and documents). The cabinet may contain the equivalent of hanging folders, called directories. These in turn may contain the equivalent of manila folders, called subdirectories. For instance, you could have two directories for your correspondence, labeled BUSINESS and PERSONAL. Your BUSINESS directory may include two subdirectories for two of your clients (EPA and IBM), and your PERSONAL directory may include two subdirectories for two of your friends (JAMIE and JOHN).


Changing the Drive

Your computer may have more than one disk drive, just as an office may have many filing cabinets. Usually, the name of the drive currently in use appears in the DOS prompt. For example, the prompt A:\> indicates that you are currently using drive A:. Unless you specify otherwise, all the DOS commands you issue will pertain to that drive. For example, if A: is the drive in use, you can use dir alone, rather than dir a: to get a list of the drive’s directory.

You may change to another drive at any time by entering a drive name as a command. To switch to drive B:, for example, just type b: and press <Enter>. (Remember to include the colon in the drive name.) The prompt will change from A:\> to B:\>. The B: drive will remain the drive in use until you enter another drive letter.

Changing the Directory

Once you have selected a drive to use, you may select a directory. Type cd (for "change directory") followed by the directory name. For example, to change to the directory named BUSINESS, type

cd business

To close a directory, type

cd ..

To open a directory and a subdirectory–for example, BUSINESS and PERSONAL–use either of the following methods:,ol. ,li.First, move into the directory, and then enter the subdirectory. Type

cd business <Enter>
cd IBM <Enter>

  • Move into the directory and the subdirectory at the same time. Type

    cd business\IBM

Looking at DOS Files

DOS stores your programs and data in the form of files. Each file has a name made up of three parts: the file name, a period(.), and an optional extension. The period separates the file name and the extension. When you create a document using a word processor, for example, you designate the file name and the extension when you first save the document. DOS has certain rules which govern the use of file names and extensions:

Rules For Filenames

  1. File names have from 1 to 8 characters but no spaces, colons, backslashes, or commas.

  2. Extensions have from 1 to 3 characters. Do not use COM, EXE, BAT, or SYS as your extension. They have special meanings for DOS.

  3. example, use letter.doc but not letter . doc.

  4. File names may contain numerals, but they may not be used as the first character. For example, use stats93.doc but not 93stats.doc.

When you use your word processor to save your files, you may type file names in upper or lower case or a combination of both. DOS will convert them all to upper case when you use the dir command. So, JUNESTAT.DOC, myfile.wks, Newdata.87, and are all acceptable.

Displaying Drive or Directory Contents

The dir command displays a list of files on a drive or in a directory. First, change to the disk drive and directory you want, and then type dir <Enter>.

The list will show the filename (with extension), the file size, and the creation date and time.

You can use several variables, or switches, to modify how the command displays the list.

To get a list of all files on drive B:, even though you are using another drive, enter

dir b:

To get a long list of all files on drive B:, one screen at a time, enter

dir b: /p

To get a long list of all files on drive B: in a wide format across the screen, enter

dir b: /w

To list the filenames in alphabetic order, enter


To list the filenames in chronological order, enter


To list the filenames grouped by extension, enter


Renaming Files

The rename or ren command changes the name of a file, though the file contents remain the same. To rename a file, enter

ren oldname.ext newname.ext

Deleting Files

The del or erase command removes files from a diskette. The commands are interchangeable. To delete a specific file in the default drive, enter

del filename.ext

Copying Files

Use the copy command to create a duplicate of a file. Enter the command, followed by the name of the original file and the name of the new file. If the file is copied to a different drive or directory, the new file can have the same file name and extension. If the file is copied to the same location, the new file must have a new name.

If the file is on the current drive or in the directory , you don’t need to specify the drive or the directory name. For example, enter

copy oldfile.ext dupfile.ext

When you copy a file from the drive or the directory you’re using to another drive, you can keep the same name or create a new one. Enter

copy oldfile.ext b: OR copy oldfile.ext b:dupfile.ext

When you copy a file from the drive or directory you’re using to another drive and another directory, specify the directory name. Remember that you can keep the same name or create a new one. Enter

copy oldfile.ext b:\letters OR copy oldfile.ext b:\letters\dupfile.ext

Practice Exercises

Instructions        Answers  
1. Restart the computer without turning the power off. <Ctrl-Alt-Del> 
2. Display the version of DOS.  VER
3. Display the date.          DATE
4. Display the time and change it to one minute later.  (For example,
change it from 10:30 a.m. to 10:31
TIME 10:31a
5. Clear the screen.      CLS        
6. Check your hard disk for problems.  CHKDSK C:     
7. Display the directory of the files on your hard disk.        DIR C:   
8. Make the hard drive the default drive.           C:  
9. Copy a file on the hard disk to the diskette.        COPY anyfile.ext  a:    
10. Make drive A: the default drive A:      
11. Rename the file you just copied to NEWFILE.TXT.       REN anyfile.ext NEWFILE.TXT  
12. Delete the file called        DEL NEWFILE.TXT     
Share on Facebook

Leave a Reply