DOS

C:\DOS                                                C:DOS\RUN                                                 RUN\DOS\RUN

What is DOS?

MS-DOS is a "Disk Operating System". That means it is simply: "a System for Operating the Disks", (but MS-SOD doesn't sound as nice). DOS does more than just operate the disks: It enables the user to organize data files, load and execute (run) program files, and control the input and output devices attached to the computer. 

There are other brands of DOS besides the most well known "MS-DOS", ie: PC-DOS, DR-DOS/OPENDOS. Generally speaking, they will all function in the same way, especially at the most simple level.

OS= Operating System

DOS=DISK Operating system

Manages your equipment and your software


What is Booting?

To run DOS on a computer, it should be the first program to be executed when the computer is switched on. This led to a problem for the designers: "How can DOS be loaded and executed when there is no DOS program running to load and execute *it*??!!". Well, just as the fictional Baron Munchausen managed to pull himself up by his own bootstraps, the computer manages this seemingly impossible trick, and the term "bootstrapping", or "booting up" is applied to this process.

How do you communicate with DOS?

DOS is an entirely text based system. All it provides for the user is a prompt: "C:>" or "A:>", where the user can type in commands from the keyboard. The system is entirely case insensitive: so either "ForMAt C:" or "format c:" would erase your hard disk...

The latter example is of course a small warning: with DOS comes power, you can very easily mess up your system if you use powerful commands in the wrong way. The commands you should be careful of are: "Format", "Recover", and "Del". All of these perform useful functions, when used correctly, and all the others are pretty much safe to use.

How does DOS organize disks?

DOS works within a file, directory and disk drive structure. This means that all program and data files are named, and grouped together in named directories on disks. 'Directories' are just lists of files.


Three different ways to get to DOS are:

1.     Click on the Start button, and then on run, to proceed, type "Command" and then press enter.

2.     Another way to enter the command prompt is to click on the Start button, then the "Programs" tab, then on "Command Prompt".  (It will have a little "MS-Dos" Icon next to it.

3.     The last way, is to click on the start button, then on "Shut down", and select "Restart in MS-Dos Mode?" and then chose O.K.

 Two ways to exit from DOS are:

1.     Type "Exit" at any directory

2.     Click on the "X" (Which means "terminate")


 

Prompt = The DOS command that changes the appearance of the DOS PROMPT.

 A DOS COMMAND HAS the following convention: Command  parameter  Switch 

 COMMAND:  A Command tells DOS WHAT to do.

 OPTION or parameter:  Is the 2nd part of a DOS command line.  It can have various command depending on the dos command used.

 SWITCH:  A switch is a subcommand that is after the main command.  It is started with the “/”  character.

 PROMPT:   Tells you what directory you are in.

 HELP:    Help can be gotten on each command by using the following switch: “/?”.

 CLS:      Clear Screen

 

CD:  Change Directory  (Same as windows folder)

MD:       Make a directory

Deltree:  Remove a directory

 DIR:    Give you directory listing.

          DIR /w:  A wide listing.

          DIR /p:  Pause one screen of text.

CD..    takes you back one level

CD c:\

 Function keys:

             F3 =  Calls up last command.

 

DIR switch commands

[drive:][path][filename]

              Specifies drive, directory, and/or files to list.

              (Could be enhanced file specification or multiple filespecs.)

  /P          Pauses after each screenful of information.

  /W          Uses wide list format.

  /A          Displays files with specified attributes.

  attributes   D  Directories                R  Read-only files

               H  Hidden files               A  Files ready for archiving

               S  System files               -  Prefix meaning not

  /O          List by files in sorted order.

  sortorder    N  By name (alphabetic)       S  By size (smallest first)

               E  By extension (alphabetic)  D  By date & time (earliest first)

               G  Group directories first    -  Prefix to reverse order

               A  By Last Access Date (earliest first)

  /S          Displays files in specified directory and all subdirectories.

  /B          Uses bare format (no heading information or summary).

  /L          Uses lowercase.

  /V          Verbose mode.

 

INTERNAL COMMANDS:

            Dir

            Ver

            CLS

            Copy

            Del

            CD

            Path

            Type

            REN   or rename

            ^C   Cancel dos command

            >    Redirect to another device

 

External commands

 EXTRACT.EXE

SCANDISK.EXE

SCANREG.EXE   

 FDISK.EXE     

 MSCDEX.EXE

FORMAT.COM     

CHOICE.COM    

 DISKCOPY.COM   

DOSKEY.COM    

 EDIT.COM

 MODE.COM       

MORE.COM      

 SYS.COM

ATTRIB.EXE     

CHKDSK.EXE    

 DEBUG.EXE     

 DELTREE.EXE

FC.EXE        

 FIND.EXE      

LABEL.EXE     

 MEM.EXE

MOVE.EXE      

SORT.EXE      

 START.EXE     

 SUBST.EXE

XCOPY.EXE     

 XCOPY32.EXE    

ANSI.SYS       

  What about DEFRAG?

FORMAT

Formats a disk for use with MS-DOS.

 

FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]

FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]

 

  /V[:label]  Specifies the volume label.

  /Q          Performs a quick format.

  /F:size     Specifies the size of the floppy disk to format (such

              as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).

  /B          Allocates space on the formatted disk for system files.

  /S          Copies system files to the formatted disk.

  /T:tracks   Specifies the number of tracks per disk side.

  /N:sectors  Specifies the number of sectors per track.

  /1          Formats a single side of a floppy disk.

  /4          Formats a 5.25-inch 360K floppy disk in a high-density drive.

  /8          Formats eight sectors per track.

  /C          Tests clusters that are currently marked "bad."



Example:

To change directory use:

C:\cd  <name of directory, or path>\<name of secondary directory/ path.>

 

NOTE: "Path" is the route to a file on a disk.  In DOS, Windows and OS/2, the path for file MYLIFE located in subdirectory STORIES within directory JOE on drive C: looks like:

 

            c:\joe\stories\mylife

Terms:

"CLS"-Clear Screen- removes all the irrelevant information, or past

 transactions, which may cause screen clutter.

 

"Dir"- displays all the files & folders in a current directory/path.

·        To display file/ folder information in a drive other than the default drive use          Dir X:\ (NOTE: "X" represents the drive letter you are to use.)

·        DIR /w: Shows a wide display of contained inside of a file or directory.

·        Dos Name: A short file name, 8 characters for the name and three character (with a dot between them) for the extension.

·        File Date: The day, and year the file was last created, or modified (includes AM or PM)

·        File Time: The time it was created (time of Day)

·        File size: Measured in Kilobytes

·        Long file name: the file name that would appear in windows.

 


Extension: I the three characters after the dot that represent the file type, or what application is necessary to run the file.

Extension:

File type:

.386

Driver (Virtual Device Driver)

.ani

Animated cursor file.

.asc

Text file (ASCII)

.avi

Movie file (audio video interlead)

.bak

Used as a back up file. (can be used by you)

.bat

Used to automatically run programs from Dos.

.cab

Compressed file made by windows.

.cfg

Configuration files, used to determine settings

.com

Dos program which is an "application".

.cur

Cursor file, non animated.

.dbf

Standard data base file.

.dll

Dynamic link library file (Used to make windows run.)

.doc

Document file (Microsoft word)

.dot

Microsoft Template Word Template.

.drv

Device driver 

.exe

Executable program

.hlp

Help file

.ini

Initialization file

.jpg

Jpeg image file

.lnk

Link, or windows short cut

.mid

Musical instrument device

.mpg

Movie file

.PIF

Program information file (dos short cut)

.ppt

Power point presentation

.prn

Dos print file

.pwl

Password list

.rar

Compresses win rar file.

.reg

Registration file

.rtf

Rich text format

.scr

Screen saver file

.sys

System File

.ttf

True type font

.txt

Text file

.url

Uniform resource locator

.vbe

VB encoded script file

.wav

Sound file

.xls

Microsoft excel file

.zip

Compressed win zip file

 


Extension for applications:

.doc

.ppt

.xls

.txt

.wks .wk*

.dbf

.mdb

And many many more…

 

Extensions for user "files"

.sys

.bat

.ini

.

 

Examples of .sys:

          IO.sys: an OS system file, and can not be edited

MSDOS.SYS: Os system file, which, depending on version, cannot be edited (95 and later can)

                    Options:

                    Boot menu

                    Method of boot (GUI (Graphical user interface))

                    Location of OS files

Config.Sys: optional, win 9x does not require a Config.Sys

(Non-existent on an NT system)

                             Config.Sys option:

Pre win 9x all drivers had to be loaded here. (CD, sound, network, etc.)

Warning: while trying to install ancient programs, the Config.Sys may be changed and mess up your system

            Examples of ini files:

                                    Win.ini: watch for the load and run statement

                                    System.ini: watch for the shell

                                    Many others.ini

Examples of the batch files:

            Autoexec.bat: optional OS batch.

A user batch file will simplify a series of DOS commands, and some windows commands