Introduction To MS - Final
Introduction To MS - Final
Ms-Dos stands stands for Microsoft Disk Operating System. Ms- DOS is an operating system.
An operating system is collection of system programs, used for controlling input/output
operation. It is also known as interface between hardware and user. A operating system may be
considered as the language translator which converts the users readable codes into machine
readable codes, means machine level language or binary digits.
C:\>
This symbol is known as C drive or C-prompt. similarly A:\> is called A-prompt or A drive.
Generally A:\ is used as floppy drive i.e. when we are working on floppy disk and C:\ is used for
local disk or hard disk. A small blinking bar we see on the screen. This is cursor. It is waiting for
your instruction. There few predefined words for DOS. These are known as DOS-Commands.
Our operating system can understand only these predefined commands.
1. Internal Commands
2. External Commands
Before we go on detail in these commands, let first we understand a term called File and
Directory. A file may be known as container of information on a particular topic. A directory may
be considered as a structure or a cabinet which keeps one or more files. Directories are usually
creates for keeping one or more identical files together. Every file have a filename which helps
to recognize them. these are divided into two parts
The primary name can be from 1 to 8 characters long. The extension contains 1 to 3 characters
long. A filename and extension are separated by using a dot symbol. Thus it's structure looks
like
Filename . Extension
The valid characters for giving a file name are form A to Z and the digits are form 0 to 9. Special
symbols are ~ ^ % # @ ! _ - { } [ ] ' `.
Extensions or secondary names are usually used for denoting the type of files or the type of
informations stored in the file. Like the filename have extension EXE, BAT, COM are
respectively Executable, Batch and Command files, which are given high priority by DOS.
Because these files could be directly understand by operating system. Similarly the filename
having extension BMP, GIF, JPEG etc. are the extension for graphical files. The files having
extension C or CPP are the files of C/C++ language, BAS for BASIC language, PAS for
PASCAL programming and so on.
Internal Commands
These commands are automatic loaded into the memory when operating system is loaded into
the memory. Thus these are also called memory-resident commands. The command available
are all combined together and are stored in Command.com file, which is a executable command
file. These internal command are further grouped according to their properties. These are as
follows.
1. CLS
7. COPY CON
2. DIR
8. TYPE 12. MD
3. VER
9. COPY 13. CD
4. VOL
10. REN 14. RD
5. DATE
11. DEL
6. TIME
1. CLS:- (Clear the screen) This command is used to clear the screen or wipe out every thing
written on the screen.
2. DIR:- (Directory) Dir command is used for listing files and directories present in the current
disk.
/P Page wise
/W Widths wise
/S List all files and directory of subdirectories
/AH Display directory with hidden files
/AS Display directory with system files
/AD Display only directories present in current drive
3. VER:-(Version) Version numbers indicates that which edition of DOS we are working on.
Output:-
C:\>VER
4. VOL:-(Volume) Displays the disk volume label and serial number, if it exist.
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
Note:- We enter new date in the format of MM-DD-YY.
Type TIME with no parameters to display the current time setting and a prompt for a new one.
Press ENTER to keep the same time.
7. COPY CON:- This command gives the facility to create a new text file.
After copy con we must specify a suitable file name. Press enter. Start typing the informations of
the file. After gathering the information we press ^Z (CTRL+Z) button or F6 button to save the
file. After pressing enter key computer will show a message like 1 file(s) copied. This means that
file is stored in the disk. Suppose we don't want to save the file or we just want to abort from file
creation job, then we simply press ^C (CTRL+C) button to abort without saving the file, intend of
pressing ^Z button.
8. TYPE:- This command is used to display the contents or text of any file to the display device.
9. COPY :- Copy command is used for copy any file to another location or to copy the files to
another directory. This command may also be used for copying any file to another disk with
different file name.
10. REN:- (Rename) This command is used to change the name of any file or directory.
Syntax:- C:\> REN <Source filename> <Target filename>
C:\>REN ROSE.TXT GULBAL.TXT
If we get successfully C:\ that means filename or directory name is get changed. Either it will
show the error message.
11. DEL:- This command is used for erasing any file from the disk.
12. MD:- (Make Directory)- This command allows to create a new directory.
Now this directory can be used for keeping various sort of reports. Under this directory we can
create another directory which is known as subdirectory.
13. CD:- (Change Directory):- We can enter or exit from any directory using this command.
Prompt will change with the directory name. If we keep two dots after CD command than we will
exit from the directory.
Syntax:-C:\> CD..
C:\REPORT> CD..
C:\>
14. RD:-(Remove directory):- This command is used when we want to remove any unusable
directory form our disk.
Syntax:- C:\> RD <Directory name>
C:\> RD REPORT
15. PATH:- This command is used for display or sets directories for executable files.
C:\> PATH=C:\WINDOWS\COMMAND;C:\WINDOWS\;C:\TC
this command will sets the directories windows, the command subfolder of windows and TC
folder for executable files. Operating system will look for executable files in these directories.
NOTE:- If we need any help for above DOS commands the we put a '/?' symbol after writting the
command at DOS prompt .
External Commands
External commands are known as Disk residence commands. Because they can be store with
DOS directory or any disk which is used for getting these commands. Theses commands help
to perform some specific task. These are stored in a secondary storage device. Some important
external commands are given below-
1. MORE:-Using TYPE command we can see the content of any file. But if length of file is
greater than 25 lines then remaining lines will scroll up. To overcome through this problem we
uses MORE command. Using this command we can pause the display after each 25 lines.
2. MEM:-This command displays free and used amount of memory in the computer.
3. SYS:- This command is used for copy system files to any disk. The disk having system files
are known as Bootable Disk, which are used for booting the computer.
Syntax:- C:\> SYS [Drive name]
C:\> SYS A:
System files transferred
This command will transfer the three main system files COMMAND.COM, IO.SYS,
MSDOS.SYS to the floppy disk.
4. XCOPY:- When we need to copy a directory instant of a file from one location to another the
we uses xcopy command. This command is much faster than copy command.
5. MOVE:- Move command is used for moving one file or multiple files from one location to
another location or from one disk to another disk.
C:\>
6. FC:-(File Compare) This command is capable for comparing two set of files and display
difference between two files.
7.CHKDSK:-(Check disk) - This command is used to check the status of a disk and show the
report of result status.
C:\>CHKDSK
8. SORT:- This command is useful when we want to sort a file. When we run this command the
result can be get to display device or file.
Syntax:- C:\> SORT /R < Input file name> <output file name>
Suppose we have a file Player.txt which having the list of a cricket player team and we want to
sort the list of players, then we uses this command
C:\> SORT Player.txt
If we not specify the output file name then result will show to the screen.
/R- switch is used for sorting the file in descending order like from Z to A or from 9 to 0.
9. FIND:- The FIND command is used to search a file for a text string.
---------- gulab.txt
A clock in a office can never get stolen
11. ATTRIB:- Sets the various type of attribute to a file. Like Read only, Archive, Hidden and
System attribute.
12. LABEL:- If you are not happy with the volume label of hard disk, you can change it.
Creating Macros:-
C:\>doskey t=time
C:\>t
C:\>time
Current time is 3:39:05.97p
Enter new time:
To list out all macros defined just type DOSKEY/MACROS at dos prompt and press enter.
C:\>DOSKEY/MACROS
$D=date
T=time
14. FORMAT:- This command creates new Track & Sectors in a disk. Every
Here a '?' symbol represent that ? can be a any character or it may be special symbols.
Suppose we want to list out all the files which primary field name made of 4 characters, the first
character start with 'C' and secondary name is 'EXE'. Then we uses
If we want to list all the files with extension .EXE the the command we give is-
If we want to display all files with first character 'D' and extension 'EXE' in floppy disk, then we
give the command
COPY:-If we have to copy the songs from our CD drive to our Hard disk. Then we suppose E:\
is our CD drive and we have to store all the songs in C:\ SONGS directory.
REN:- If we want to rename all the files which have extension of 'TXT' to extension 'MSG' then
we give the command
DEL:- If we want to erase those files which have the extension of 'TMP' from our disk then we
uses the command
Edit
Edit is an external way to create or modify any file. Edit meant Editor is very good utility for
creating or modifying any file.
To start Edit type Edit on dos prompt and press enter. Then a full screen window will appear
like this-
File label displays the current file name which is open in the current window. If file name is not
specified then Untitled will be show.
A menu bar contains various commands. Which are given in detail. Select the items from menu
and click.
New:- New command open a new window for creating new file with file name Untitled.
Save As...:- Some time we need a copy of any existing file with minor changing. Like if we are
writing a letter to few consumers with same message but with different name and address. At
that time Save As option helps us to save our time. We create a letter for one consumer and
save that file with his name, again after changing the name and address of file for next
consumer we Save As the file with next consumer name and so on for others.
This option is same like as copy command of DOS. But it helps when we are going to use the
file systems like Mail Merge.
Close:- Close option is give for close the current open file.
Edit:-All the commands available in this menu are related to editing the current open document.
Before start editing we must need to select the text. The key combination for selecting the text
are as given below-
CUT:- Cut option remove the selected text and store them to the memory buffer. The sort key
for cut is CTRL + X.
COPY:- Copy option copy the selected text into memory buffer. selected text can be copied also
by pressing CTRL + C
PASTE:- Paste will insert the text store in computers buffer to the current cursor position. It can
be achieved by pressing CTRL + V button.
CLEAR:- We can delete the selected text for ever by clear option. This command is useful when
we need to delete a long paragraph or more than a line. We select the whole line by pressing
SHIFT + DOWN ARROW key and after selection just press DEL key the sort key for this option.
Search:- This menu contains the items for searching and replacing the text of document. This
facility provide very powerful feature when we have to replace text with another text in a large
document.
Repeat last find:- From Find edit will search only once the text we type on the Find
What field. If we want to search same text , the we select Search->Repeat Last Find or just
press F3button.
Split Window:- As declared above that we can open two files at same time in two different
window. Place the cursor in the document after which we have to split the window and select
View->Split Window option.
Resize Window:- To change the size of each window we select this option. To change the size
of the selected window select View->Resize Window and press enter. The divider between two
files will change to resizable cursor, which can be move up or down using up and down arrow
key. To fix the size press enter key.
Close Window:- If you are not more need of two window, place the cursor in one which you
want to close and select View->Close Window. Second window will maximize to full screen
mode.
Option:- This menu contains the items for changing settings for editor like setting of printer port,
tab spacing and color management.