DOS
Command .Com:-
The command. Com is called the command processor. The command
processor reads command from the keyboard and executable
command files. These files have the file name Auto .exe. bat or the file
extension.com or .exe. Command.com also produces the dos disk
prompt (A>) performs error checking and display error messages then
system error are detected. There are two types of Dos commands
.These are called:
1) Internal commands
2) External commands
1) Internal commands :- These commands loaded into memory when
Dos is boated or we can also say that internal commands are those
commands whose specifications are given in command.com
.Internal commands are always available for your use. Although
they are not see when you display the disk directory of file names
on your screen. Some internal commands are: Floppy, Del, Dir,
Ren, and Type.
2) External Commands: - External commands are conventional
program files. These files can be deleted , copy and even rename
.These files are displayed when DIR lists or directory on the screen
or we can also define that external commands are those
commands whose specification are not given in command.com.
e.g:- Cls, CH DIR, FORMAT, Computer.
DIR:-
A directory is a list of file name that is automatically listed on a a
screen when we type DIR.The DIR is an internal command .This
command lets you group common files into separate directories. This is
similar to sub dividing information into file cabinate drawer and file
folders.
There are many forms of DIR Commands:-
1. DIR:- It lists a directory of the disk located in the active disk derive.
2. DIR/D:- Lists a directory of the specified disk “D”.
3. DIR/P:- It pauses the directory listing when the screen is full press
any key to see the next screen.
4. DIR/W:- Displays a wide directory am its file size ,date and time
information.
5. DIR/S:- It is displays all files in all sub-directories.
6.DIR/O:-Sort Order:- It specifies sort order by main ,extension ,date or
file size. Where sort order is
a) N (alphabetically by Name)
b) -N (Descending )
c) S (file size) (smallest first)
d) -S (file size) (largest first)
e) D Date and time order (earliest first)
f) -D (most recent first)
g) E (alphabetically by extension)
h) -E (Descending alphabetically order by extension)
DOS
1) MKDIR or MD:- The MD command is used to make a new sub
directory that is subordinate to the currently logged directory to
make a sub directory having a name student Type MD student
and press return. You can also use MKDIR TO CREATE A
DIRECTORY.
2) CD or CHDR:- The CD Command is used to change the one dir. To
another.e.g:- if you are in a main directory and wish to move
down to the sub directory (compt) Type CD command and press
return. You can move to any dir. from another by including the
complete path name in your CD command .TO move to the root
dir. From any sub dir. Used.
3) RMDIR or RD:- THE RD Command is used to remove a sub dir. Or
to delete a sub dir.You must delete all files with in a sub dir.
Before it can be deleted.If necessary you can copy the files you
want to keep in others dir. With copy command.To remove an
empty sub dir. Having the name computers go to the dir. Level
immediately above the one to be removed and type RD
Command.
DEL TREE
The Del tree command is used to delete a directory and all attached sub
–directories and files. This is a simple command but it should be used
with caution to avoid the loss of sub-directory that may be important.
You can delete and entire directory structure without deleting files and
sub-directories .e.g.:-if you wish to delete the entire directory
computer. You can use the command Del tree computers. Dos prompts
you to verify the deletion .Type y to verify .You can also use the
command Del tree/y which tells dos to delete without prompting you
for a yes or no decision.
Files:-
A file is the collection of text or data stored a storage device such as
floppy disk or hard disk just as you stored different types of documents
in conventional files compt. Files to store information usually one
compt. file stores only one kind of information .Therefore different
types of files are used in a compt. The file that stores letters documents
etc. is called a document or a text file.
The file that stores data based information is called a data base file.
Similarly a file that contains instructions written in a programming
language is called a program File.
Each file is given a name called file name .The file name is dos can be up
to a alpha-numeric characters long. Optionally it can also have a data (.)
followed by an extension name. The name can be up to 3 characters
long. e.g.:-Progress.Doc
Copy:- The copy command is the internal Dos Commands .It is used to
Copy one or more specified files to another disk with the same files
name date and time information. Copy one or more specified to
another disk. The general form of a copy command is
Copy source file target file
The space separates two files names. The source file is the file name of
the file being copied. The target file is the file name of the file created
by copy command. You can also use these drive designators like A: or C:
and also path names.
e.g.:- copy c:/ forms / form. Txt A: / MAD /Hello.txt
This commands copies a file name form.txt from a dir. Name forms an
disk C to a new file named Hello.txt. In a dir. Path name “mad” on disk
A.
Copy con:- You can create a new file and dir. Enter text in it from a
keyboard by using a copycon command e.g.:-
Copy con C:\ sample.txt
In copy command we need to specify source and destination. In this
command the source is con.
In DOS can refer to the console (keyboard and video monitor). Thus the
command receives the source (input) from the keyboard and creates a
copy of that in the sample.txt file in drive c.
Type Command:- The type command is an internal Dos command. This
command displays the content of text file on your screen. The general
form of type command is
Type Filename:- The name file is displayed on the screen. If it is longer
than the screen. Its scrolls upwards until the last line of the file are
displayed. The typed file moves upwards so rapidly that it is difficult to
read. You can use more filter command to freeze each screen full of
information using
Type filename more
Freezer each screen full of information and prompts you to strike a key
to display the next screen.
MS SYS Program:- It interacts directly with application program and
IO.SYS” program. An as interested program calls for printing data
storage or retrieval information display and so on roots these calls to
the IO-SYS program which response to the request.
IO.SYS Program:- This program interacts between your compt.
ROMBIOS (Read only memory basic input /output sys) and MS DOS . At
startup IO.SYS resets the disk system and initialize attached devices.
IO.SYS always contains at least 5 device drivers which are use to control
the operation of keyboard, screen, printers and disk controllers.
The final task performed by IO.SYS is to load the command processor
program i.e.:- command. Com. the IO.SYS file is programmed by the
manufactures of yours compt. Sys. Therefore the specific type and no.
of devices drivers varies between compts.
Help (?) :- The help command displays information about the DOS
command .You can display information in two ways.
1) You can display the information using the form
Help Command
A screen full of descriptive information is displayed about the
named command.
2) You can also type the command and add /? To achieve the
same result. e.g.:- The command CHKDSK /?
Displays the screen full of information about the check the disk
command.
You can also type help and press return to display the full index of
dos commands .Then point to a command or type the command
name to access it within the index. The help command is
convenient for displaying the information about seldom used
commands. You may know the basic commands but that
remember all available parameters. The command is displayed in
addition to the list of parameters and definitions.
Wild cards: (? , *)
C:\DIR CAB *. TXT
Del command:- Del command removes files from a disk . Del u an
internal command .There are some DOS users. Who have adopted the
alternative form it erase.The general form of a del command is
Del file name
Regardless of the lagged drive or file path. You can delete any file from
any disk placing the disk drive designator such as A: at the beginning
of the file name. You can use the directory path name in the command
Del C : \ data \ temp .TXT
Be conscious while deleting a file.Once deleted file is gone farever
unless you have a file recognitivity. Multiple files can be deleted by
using the wild card in youe del command.
e.g.:- If you gone to delete all obj files on the disk D you can use
Del B : * . OBJ
This command deletes every file name that has the extension .obj
Rename:- The rename is command is the external command .It is used
to change the name of one or more files. The rename command is
straight forward and easy to use . The general farm of rename
command is
Ren old file name .txt newname.txt.
Either the entire ward Rename or the short form Ren is permitted .
Most users prefer the short form
e.g.:- Ren *command * program
This changes the extension command to program on all file names
located on the disk in the default drive.
Batch files:-
A file created by text editor of dos having various commands in it each
of different type and can be executed by just typing its name is known
as batch files. A file with extension .Bat is considered as batch file . Each
line of this file is taken as dos command.
Batch files is a group of internal & external commands stored in a single
file. E.g:-
Copycon Abc .bat
Date
Time
Vel .
Ctrl Z
Here we created a batch file named Abc.bat which contains the date
time and version commands and when we type Abc on command
prompt. It will execute this file and shows the current date , time and
version of Dos.
Creating a batch file:-
Create a file with extension . Bat and write a relevant sequence of
command.
Running a batch file:-
We just type the name of the file on the command prompt and press
enter.
Stopping a batch file:-
The execution of a batch file can be stopped in between with the help
of ctrl + c.
Config. Sys.:-
It is the configuration file of your pc. It allows us to alter or select the
specific features of Dos. It also allows to load the necessary progs to
make those hardware devices work that are otherwise not supported
by Dos. For extance to use the mouse or CD Rom we have to use the
necessary commands in configuration system .To look at the
Configuration system of pc enter
Type c: \ configuration cystem
The contents of configuration system may look like
BUFFER = 40
COUNTRY = 044
FILES = 50
LAST DRIVE = F
DEVICE = C : \ SYS \ ANSI . SYS
Commands used in Configuration System:-
1) Break ON \OFF :- If we use break on in configuration system we
can come out of a prog that will take too long to finish by pressing
ctrl-Break keys. When break is off dos checks ctrl break keysonly
when it is working with keyboard , video display, printer or serial
parts .
2) BUFFER :-The buffer commands specifies the size of disk buffer.
The disk buffer is the reserved area of Ram for the disk read and
write operation. The disk buffer helps to reduce the disk access
that result in faster read write operation on the disk.
3) Devices:-The device commands allows to install any hardware
device that is not supported by Dos. For instance if you need to
use the mouse you have to install device prog. For it. The device
command enables to install the device drives in the memory of
the pc . The command has the following syntax
Device = file name
Where filename includes the name and complete path of the
device driver that we want to use.
4) FILES :- The files commands specifies the maximum no. of files
the dos can open simultaneously. The command has the following
syntax
Files = nn
Where nn is the max . no. of files that dos can open.
5) COUNTRY:- The country command in configuration system allows
you to select the format for date & time as per the style followed
in particulars country. When you select a particular country dos
automatically changes certain setting such as date & time format,
the currency symbal etc.
6) Last Drive:- The last drive command tells dos how many drives
there are an our PC.
e.g:- Last drive = C inform dos that drive C is the last drive an
the sys.
7) SHELL:- There is a file command .com in the root directory of hard
disk or Dos sys disk. This file is called command processor . This
file is used to analysed and execute commands that should enter.
The shell commands allows you specify another file as the
command processor file. You can also use the shell command to
specify the location of command.com.