An Overview of MS-DOS


MS-DOS as an Operating System

An operating system consists of one or more programs that control the allocation and usage of hardware resources (e.g. memory, CPU time, disk space, peripheral devices) and function as an interface between the user, application programs, and the hardware.

Microsoft Corp. MS-DOS 1.0 came out in 1981. Since then there have been a number of upgraded versions, the last being Version 6 Release 22 (v6.22). Versions are upward compatible.

Unlike GUI (Graphical User Interface) Operating Systems like Windows 95, MS-DOS has a command-line interface. That is commands are typed at the so-called MS-DOS prompt

     C:\DOS>
where C: identifies the default drive and\DOS identifies the default path. The top level directory, identified by a single \ as in C:\> is called the root directory.


Classifying MS-DOS Commands

MS-DOS commans fall roughly into three categories
Environment Commands
which report on or affect the operating system environment. Examples are CLS (clear screen), TIME, DATE, VER (display MS-DOS version number), and HELP.
File Manipulation Commands
which manipulate files. Examples are COPY, DEL (delete), TYPE (display file to screen) and, DIR (directory - or list all files in current directory).
Utilities
which perform some useful function. Examples are FORMAT (format a diskette) and EDIT (invoke MS-DOS text editor).

MS-DOS File Specifications

All files under MS-DOS are specified by a four part naming convention. MS-DOS File Manipulation commands identify files in this manner.

drive:\path\filename.ext

where
drive:

       is a single letter identifying the device where the file is found (e.g. c:)
 
\path \

       is the hierarchy of directories (folders) where the file is found. Directories are separated by \(back-slash character)
 
filename

       is the file name of from 1 to 8 letters and or digits. Blanks and certain special characters (e.g. \ or .) are not allowed.
 
.ext
is the file type or extension of up to 3 non-blank characters. File types or extensions are used to identify the type of file where certain naming conventions are used. For example, .exe identifies an executable file, .txt indentifies an ASCII text file, and .doc and .wpd identifies MS-DOS Word and WordPerfect documents.
Remember all directory names and file names are limited to 8 characters (digits, or letters) although MS-DOS running under Windows NT allows longer names. Embedded blanks are NOT allowed and in general special characters are not allowed.

        Example c:\dos\autoexec.bat


Some MS-DOS File Manipulation Commands

Commands that reference files may either give the full file specification (drive:\path\filename.ext) or a partial file specification where the default drive and pathname values given by the MS-DOS prompt are used. The rule is when the drive name and/or path is not given, the default values are used.

For Example, full file specifications are given by

    C:\DOS> copy a:\file1.txt c:\dos\file1.txt
Alternately, one can use the default values where the target of the copy command defaults to c:\dos.
    C:\>DOS> copy a:\file1.txt file1.txt

In the commands given below, we adopt the convention that anything enclosed in square brackets, [ ], is optional. For example, [x:\path \] refers to an optional device and/or path.


Working with Directories and Path Names

The following commands can be used to create and remove subdirectories and set the default drive and directory. Again anything in square brackets [ ] is optional.

Using the more command

One of the problems with MS-DOS commands is "screen overflow" - more material is displayed than can be held on screen. To get around this problem use the more command

To display the contents of a file one screen at a time use

    h:\> more filename.txt

To display execute an MS-DOS display command in conjunction with more use h:\> cmd | more. For example

    h:\> dir | more


The vertical bar "|" character is called a "pipe"



Miscellaneous MS-DOS


An On-Line Exercise Using MS-DOS