Skip to main content

Skip to navigation

The access keys for this page are:

Ministry of Energy Mines and Responsible for Core Review

 

 

Appendix A: DOS (Disk Operating System) Primer

 

A: Introduction
B: Files, Directories and Sub-directories
C: The AUTOEXEC.BAT and CONFIG.SYS Files
D: Useful DOS Commands

 

A. Introduction

 

DOS is a computer program which manages and controls your hardware and other software programs.

 

  • The DOS prompt looks like this: C> or C:\>.
  • The > symbol means that the program is ready for a command.
  • When you see the symbol in the following pages, it indicates specific instructions for MINFILE/pc.

B. Files, Directories and Sub-Directories

 

One of the most common mistakes that beginners make is to have no discernible organization or poor housekeeping in maintaining files on your computer. To overcome this you need to know what files, directories and sub-directories are.

A file is simply a document of some kind stored on a disk or the hard drive. A file usually has an 8 character name and a 3 character extension. Most programs automatically name a file with the appropriate extension, for example .DOC files are created from Microsoft Word.

A directory is a convenient way to organize your files. Directories are like file folders, they contain one or many documents dealing with the same subject. You may want to put all your financial documents in a file folder named Finances.

A sub-directory is a further division of the main directory.

You can create as many directories or sub-directories as you wish to assist you in keeping your files organized. You should never work directly in a directory that contains program files. Always work in another, neutral directory. For example C:\WORD\DOCS.

 

C. The AUTOEXEC.BAT and CONFIG.SYS Files

 

It is sometimes necessary for you to make changes to these files in order to run your programs correctly and efficiently.

 

  • Before making changes to these files, make a copy of them (see COPY command).
  • Make sure you know what you are adding and the proper usage.
  • Use a text editor that you are familiar with or use the DOS 5 editor by simply typing EDIT filename at the DOS prompt.
  • You can also use the EDLIN editor. However, this is not an easy editor to use.

MINFILE/pc requires a lot of conventional memory, about 570 K, so make sure that there are no TSR's (memory-resident programs) loading when you start your computer. The TSR's would be located in the AUTOEXEC.BAT file.

 

SAMPLE AUTOEXEC.BAT:

 

@echo off
prompt $p$g
PATH C:\WIN;C:\DOS;C:\QKM;C:\MINFILE;C:\UTILS;C:\BAT;C:\APPS\FOXPRO;
C:\WIN\SMARTDRV.EXE 2048 1024
set TEMP = c:\dos

 

Don't worry too much about what each line means, the most important thing for you to understand is the path statement.

The path statement tells the system where your programs are located. When you add a program to your system you need to add the name of the program to the path. This enables you to call the program from any location on your computer. If the program name is not on the path you can still run the program but you must be in the proper location (where the program files are) to do so. Note also that the path statement is limited to 134 characters.

Quite often the install portion of a new program will automatically alter the AUTOEXEC.BAT file.

MINFILE/pc does not alter the AUTOEXEC.BAT, so you must add MINFILE to the path statement.

 

SAMPLE CONFIG.SYS:

 

files = 44
buffers = 30
device = C:\WIN\HIMEM.SYS
device = C:\WIN\EMM386.EXE noems
devicehigh = C:\dos\setver.exe
shell = C:\COMMAND.COM /e:512 /p
dos = high,umb
devicehigh = c:\dos\ansi.sys
devicehigh = c:\vgautil\mouse.sys
Stacks = 9,256

 

The CONFIG.SYS defines the devices that you want to use, their drivers and where they are located.

Some of these devices can be set to run in extended memory leaving more of the basic RAM available for programs and devices that cannot run in extended memory.

Files = __ tells DOS how many files it can have open at one time, MINFILE/pc requires that this number be 42.

BUFFERS = __ sets the amount of RAM reserved for information transferred to and from a disk. This amount is defined by the size of you hard disk as follows:

 

  • Less than 80 MB = 30
  • 80 thru 119 MB = 40
  • More than 120 MB = 50

The higher the number of buffers the faster your system runs, however, this also uses more conventional RAM.

 

D. Useful DOS Commands

 

In general, all DOS commands:

 

  • Are followed by a space.
  • Use the from - to format, for example COPY from a file to a new file.
  • Can be used in several different ways.
  • Are initiated when hitting the enter key.
  • Must include the location (path) of the file(s) that you are manipulating unless you are in the directory where that file(s) is.
  • Are stopped by hitting CTRL-C.
  • Use "* "as a wild card and can be used to replace anything, for example *.bak refers to all the files that have the .bak extension no matter what the 8 character name of the file is.

COMMAND: BACKUP

PURPOSE: Backup files from your hard drive and archive them unto floppy disks for storage.

USAGE: Type BACKUP followed by the location and name of the file or files you wish to backup for storage, then the location of the blank disk.

EXAMPLE: BACKUP C:\WORK\*.* A:

COMMAND: CD (change directory)

PURPOSE: Change or display the current directory.

USAGE: CD is followed by the full name of the directory to which you are changing; the directory's name usually starts with a backslash. If you type CD followed by two dots ".." then change the current directory back one level in the directory tree. Typing CD\ returns you to the root directory (C:\) from wherever you are.

EXAMPLE: CD \MINFILE\DATA

COMMAND: CHKDSK (Check Disk)

PURPOSE: To analyze the allocation and status of storage space on the hard drive or floppy disk. A report is displayed on screen of the amount of space occupied by files and directories, the total system memory and the number of bytes that are available for use.

USAGE Type CHKDSK and then the drive or hard disk that you wish analyzed.

EXAMPLE: CHKDSK C:

COMMAND: COPY

PURPOSE: Copy a file to another file and/or location.

USAGE: COPY is followed by the location and name of the file you are copying, then the location and/or name of the copy you are making. Always give the entire path name. If you are making a copy to the same location, the name must be changed.

EXAMPLE: COPY C:\report.doc C:\MONTHLY\finalrep.doc

COMMAND: DEL (Delete)

PURPOSE: Delete one or more files.

USAGE: DEL followed by the specific name and/or location of the file you wish to delete, or if you use a wild card (*) then the name and/or location of the group of files you wish deleted.

EXAMPLE: DEL *.bak or DEL C:\MONTHLY\report.doc

COMMAND: DIR (Directory)

PURPOSE: Display the contents of a directory (files and directories).

USAGE: By typing DIR you can see a list of all the files and sub-directories contained in the current directory. Typing DIR followed by a location will give you a list of the files and sub-directories in  the specified directory. DIR followed by a file name or a group of files (using the wild card *) will  list the specified file(s).

EXAMPLE: DIR A:\*.DOC OR DIR C:\

COMMAND: DISKCOPY

PURPOSE: To make an exact duplicate of a floppy disk.

USAGE: DISKCOPY followed by the location of the source disk to be copied and then the location of the blank disk to be copied to.

EXAMPLE: DISKCOPY A: B:

COMMAND: FORMAT

PURPOSE: To prepare floppy disks for use.

USAGE: Before a floppy disk can be used, it must be formatted. The FORMAT command is followed by the location of the disk to be formatted. NOTE: NEVER, NEVER use format with a drive higher than B:\.

EXAMPLE: FORMAT A:

COMMAND: MORE

PURPOSE: View text files one screen at a time.

USAGE: This command is used with another DOS command such as TYPE (see below). Type in TYPE filename | more to view the named file one screen at a time.

EXAMPLE: TYPE report.doc | MORE

COMMAND: PRINT

PURPOSE: Prints files.

USAGE: Type PRINT followed by the file name. The system will prompt you for the device and if it is the one that you are hooked up to simply hit enter. The file will then be queued (up to 32 files) and will print out when it is it's turn.

EXAMPLE: PRINT report.doc

COMMAND: RD (Remove Directory)

PURPOSE: Remove or delete a directory.

USAGE: The directory must be empty of files before deleting it. Type RD and the location and name of the directory.

EXAMPLE: RD C:\USER\TEMP

COMMAND: REN (Rename)

PURPOSE: Rename a file without changing the contents.

USAGE: Type REN filename newfilename. Remember the DOS naming conventions, use only eight characters or numbers and you should have no problems.

EXAMPLE: REN report.doc finrep.doc

COMMAND: RESTORE

PURPOSE: Restores files that were backed up using the BACKUP command

USAGE: Type RESTORE followed by the location of the file(s) you wish to restore, then the location of where you want the files restored to. Be careful, if the name of the directory that you backed up from is not the one that you are restoring to, you could  have some problems. Usually the inclusion of the /s (include sub-directories)  command will overcome this problem.

EXAMPLE: RESTORE A: C:\NEW /s

COMMAND: TYPE

PURPOSE: Display a file on screen.

USAGE: Typing TYPE followed by the file name will display the file on screen. However, unless you use the MORE command, the contents of the named file will  continuously scroll by to the end of the file.

EXAMPLE: TYPE report.doc

COMMAND: MD (Make Directory)

PURPOSE: To make a directory or sub-directory.

USAGE: Type MD and then the name and location of the directory or sub-directory that you wish to create.

EXAMPLE: MD C:\WORKSHOP

OTHER COMMANDS:

COMP (Compare) - Compares the contents of two files line by line.
DATE - Displays the current date and allows you to change it.
PATH - Displays the path statement from your AUTOEXEC.BAT file.
TIME - Displays the current time and allows you to change it.
VER - Displays the version number of the DOS that you are using.
XCOPY - A super COPY command which includes sub-directories.
MEM - Tells about the memory in your computer and how it's used.