Msdos Intro - PPT - 20250102 - 221441 - 0000
Msdos Intro - PPT - 20250102 - 221441 - 0000
BY
Gaurav Jain
(Asst.Proff,MCA)
MS-DOS basics:
What is MS-DOS?
MS-DOS stands for Microsoft Disk Operating System. MS-DOS controls the
computer’s hardware and provides an environment for programs to run. This system
program must always be present when working with your computer.
By following the procedures in this unit and the self study file, you will
learn to:
View the contents of a directory
Change from one directory to another
Create and delete directories
Change from one drive to another
Copy files
Rename files
Delete files
Format a floppy disk
The Command Prompt
When you first turn on your computer, you will see some cryptic
information flash by. MS-DOS displays this information to let you know
how it is configuring your computer. You can ignore it for now. When the
information stops scrolling past, you'll see the following:
C:\>
This is called the command prompt or DOS prompt. The flashing underscore
next to the command prompt is called the cursor. The cursor shows where
the command you type will appear.
If your command prompt looks like the sample command prompt above, skip
to the following section, "Typing a Command."
If your command prompt does not look like the example, type the following
at the command prompt, and then press ENTER:
cd \
Note that the slash leans backward, not forward. You will learn more about
the cd command later in the tutorial. If your command prompt still doesn't
look like the example, type the following at the command prompt, and then
press ENTER:
prompt $p$g
Your command prompt should now look like the example.
Typing a Command
This section explains how to type a command at the command prompt and
demonstrates the "Bad command or file name" message.
To type a command at the command prompt
Type the following at the command prompt (you can type the command in either
uppercase or lowercase letters): nul
If you make a typing mistake, press the BACKSPACE key to erase the mistake,
and then try again.
Press ENTER. You must press ENTER after every command you type.
The following message appears:
Bad command or file name
The "Bad command or file name" message appears when you type something
that MS-DOS does not recognize. Because nul is not a valid MS-DOS
command, MS-DOS displays the "Bad command or file name" message.
Now, type the following command at the command prompt:
ver
The following message appears on your screen:
MS-DOS version 6.22
The ver command displays the version number of MS-DOS.
Continue to the next section, where you will use the dir command to view the
contents of a directory.
Viewing the Contents of a Directory
In this section, you will view the contents of a directory by using the dir command. The dir
command stands for "directory."
To view the contents of a directory
Type the following at the command prompt:
dir
A list similar to the following appears:
Volume in drive C is MS-DOS_6.22
Volume Serial Number is lE49-15E2
Directory of C:\
WINDOWS <DIR> 09-08-92 10:27p
TEMP <DIR> 05-15-92 12:09p
CONFIG SYS 278 09-23-92 10:50a
COMMAND COM 53014 09-18-92 6:00a
WINA20 386 9349 11-11-91 5:00a
DOS <DIR> 09-02-92 4:23p
AUTOEXEC BAT 290 09-23-92 10:54a
7 file(s) 62931 bytes
8732672 bytes free
This is called a directory list. A directory list is a list of all the files and subdirectories that a
directory contains. In this case, you see all the files and directories in the main or root
directory of your drive. All the files and directories on your drive are stored in the root
directory.
Versions of Dos
MS-DosIt is developed by IBM and Microsoft in a joint
venture for use with IBM Compatible computers.
DIRWith the use of this command we can view all the files and
directories of the current drive or directory.
Syntax:-C:\dir. and press enter.
DIR/PIt will lists all the directories in page wise manner.
Syntax:- C:\dir/p and press enter.
DIR/AIt will display all the files and directories plus the
hidden directories and folders.
Syntax:- C:\dir/a and press enter.
DATEDisplays the current time of the system plus it sets the
system date.
Syntax:- C:\date and press enter.
Internal Dos Commands
TIMEIt Displays the current time plus it will set the new time.
Syntax:- c:\time and press enter.
CDThis command is used to enter into the current directory.
Syntax:- c:\cd <name of the directory>
Example:-C:\cd gaurav.
It will look like this:
C:\gaurav>.
CD..This command will make us step by step out of the directory in
which we are currently working.
Syntax:-c:\cd..
It will be effect like this:
Given Conditionc:\gaurav .
once you type this command the result will be:
Resultc:\
Internal Dos Commands
CD\With the use of this command we can directly get out of all the directories in one step.
Syntax:-c:\cd\
It will be effect like this:
Given Conditionc:\gaurav>shanu> .
once you type this command the result will be:
Resultc:\
COPYCONThis command is used to create a file.
Syntax:-d:\copy con <file name>
Data of the file.
press ctrl+Z. and press enter.
Example:-d:\copy con shanu
my name is shanu
^z(ctrl+z). And press enter.
Result:- d:\copy con shanu
my name is shanu
^z(ctrl+z).
1 File(s) copied.
Internal Dos Commands
TYPEThis command is use to view the contents of the file or read the
contents of the file.
Syntax:-D:\type <file name>.
Example:-D:\type shanu.
Result:-my name is shanu.
DEL
Erase
the above two commands are used to erase or delete the file.
Syntax:-d:\del <file name>
d:\erase<file name>
Example:-d:\del shanu.
It will delete the file shanu.
To change the current driveif we want to change the drive in which we are
currently working. The default drive is C:\.
We can change it by writingD:\ in place of C:\.
Internal Dos Commands
MD This command is used to create a directory in dos just
like the folder creation in windows.
Syntax c:\MD <File Name>.
SyntaxC:\cls.
LABEL This command is used to add or modify the disk volume label. Here
label means the name of the particular disk. here disks are the c drive d drive
that we can see in my computer.
Syntax a disk volume can be up to 11 characters long and may include spaces.
External Dos Commands
UNDELETE This Command is used to recover the deleted files. we
always type this command with the name of the deleted file.
Syntax UNDELETE <file name> .
The point to be consider here is “once you format any disk or drive the
whole data of the particular drive will be erased or lost.
SyntaxFORMAT <name of the drive>.
External Dos Commands
CHKDSK This command will display the following information related to a
particular drive or a disk:-
1.The total space of the disk.
2.the total space occupied by a disk or drive.
UNFORMATThis command is used to recover only those files that are got
erased or deleted because of the the effect of FORMAT command.
SyntaxUNFORMAT <name of the drive>.
DELTREE This command is used to delete a directory and all attached sub
directories and files. Before the introduction of DELTREE it is necessary to
delete all sub directories and files before the directory could be deleted.
SyntaxDELTREE <Directory name>