0% found this document useful (0 votes)
78 views69 pages

ITAB Lab - MS DOS

The document provides information about MS-DOS commands. It begins by stating the learning outcomes which are to use commands to manipulate directories and files, and use parameterized commands to change system information like date and time. It then introduces MS-DOS and how to open and exit the command prompt. It describes the different types of internal commands and provides examples of commands for clearing the screen, checking the system version, and viewing the date, time, and directory contents. It also discusses commands for creating, deleting, and changing directories.

Uploaded by

svasvasv da
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views69 pages

ITAB Lab - MS DOS

The document provides information about MS-DOS commands. It begins by stating the learning outcomes which are to use commands to manipulate directories and files, and use parameterized commands to change system information like date and time. It then introduces MS-DOS and how to open and exit the command prompt. It describes the different types of internal commands and provides examples of commands for clearing the screen, checking the system version, and viewing the date, time, and directory contents. It also discusses commands for creating, deleting, and changing directories.

Uploaded by

svasvasv da
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

Computer

Applications Lab
(BBA-111)
By: SHIVANI KHURANA
Assistant Professor
RDIAS 1

BBA 111 CAL 13 December 2021


Unit-1
Knowledge of all Commands

2
Img Src: https://fossbytes.com/microsoft-re-open-source-ms-dos-1-25-and-2-0-codes-on-github/

BBA 111 CAL 13 December 2021


Learning Outcomes

After studying this, students will be able to:

• Use commands in MS-DOS to manipulate directories and


files.
• Use parameterize commands to change system
information like date and time.

BBA 111 CAL 13 December 2021


Introduction
• Microsoft Disk Operating System, in short MS-DOS is a
software to operate the “Computer System”.

• It is developed by Microsoft Company in 1981.

• It is an Non-graphical(CLI/CUI) command line operating


system.

• Today DOS is no longer used, but Windows OS provides


Command prompt, it is an command line interpreter for
Windows OS.

4
• We can use command prompt to execute MS-DOS commands.

BBA 111 CAL 13 December 2021


How to open DOS

BBA 111 CAL 13 December 2021


Long Method

BBA 111 CAL 13 December 2021


Short Cut Method

BBA 111 CAL 13 December 2021


How to Exit DOS
Syntax
• Exit and press Enter
Input
• Exit and press Enter
Output
• Command will help you to come out of MS Dos

BBA 111 CAL 13 December 2021


Basic Information about File Names

• MS-DOS Commands are not case sensitive.

• If the file name contains more than one word then enclose in
quotes. E.g. “raj jain”.

• File name contains two parts primary name and secondary


name i.e. extension.
 Standard file naming rule is for MS-DOS is 8.3
 Complete File name can be max 260 characters length.

BBA 111 CAL 13 December 2021


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.

• Internal command are further grouped according to


their properties. 10

BBA 111 CAL 13 December 2021


Types of Internal Commands

11

BBA 111 CAL 13 December 2021


General Purpose Commands
• CLS:- (Clear the screen) This command is used to clear the
screen or wipe out every thing written on the screen.
• Syntax:- C:\> CLS and press Enter
• DIR:- (Directory) Dir command is used for listing files and
directories present in the current disk.
• Syntax:- C:\> DIR and press Enter

12

BBA 111 CAL 13 December 2021


General Purpose Commands
• VER:-(Version) Version numbers indicates that which
edition of DOS we are working on.
Syntax:- C:\> VER press enter
• VOL:-(Volume) Displays the disk volume label and serial
number, if it exist.
Syntax:- C:\> VOL press enter
• DATE:- Display the current Date
Syntax:- C:\> DATE press enter
• TIME:- Display current time
Syntax:- C:\> TIME press enter

• 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. Note:- We enter the time in the format of 13
24 hour clock.
BBA 111 CAL 13 December 2021
Command for clear the screen or wipe
out every thing written on the screen.

Syntax
• CLS and press Enter
Input
• CLS and press Enter

Output
Command will clear all the complete contents of the screen
and leave only a prompt.

14

BBA 111 CAL 13 December 2021


Command for clear the screen or wipe out
every thing written on the screen output
• Before use of CLS
command

• Using CLS (press enter)


command

• After use of CLS


command 15

BBA 111 CAL 13 December 2021


Command to Displays the volume of
information about the designated drive

Syntax
• VOL and press Enter
Input
• VOL and press Enter
Output
• Command will display the volume of information about
the designated drive.

16

BBA 111 CAL 13 December 2021


Command to Displays the volume of
information about the designated drive
output

17

BBA 111 CAL 13 December 2021


Command to know edition of DOS we
are working on

Syntax
• VER and press Enter
Input
• VER and press Enter
Output
• Command Will display the edition or version of DOS
we are working on

18

BBA 111 CAL 13 December 2021


Command to know edition of DOS we
are working on output

19

BBA 111 CAL 13 December 2021


Command to Display the current Date

Syntax
• Date and press Enter
Input
• Date and press Enter
Output
• Command will display the current date

20

BBA 111 CAL 13 December 2021


Command to Display the current Date
output

21

BBA 111 CAL 13 December 2021


Command to Display the current time

Syntax
• Time and press Enter
Input
• Time and press Enter
Output
• Command will display the current time

22

BBA 111 CAL 13 December 2021


Command to display the current time
output

23

BBA 111 CAL 13 December 2021


Command to see all the content or folder in
the directory

Syntax
• Dir (Press Enter)
Input
• Dir (Press Enter)
Output
• You various folder under the directory or drive.

24

BBA 111 CAL 13 December 2021


Command to see all the content or folder
in the directory

25

BBA 111 CAL 13 December 2021


Command To Change Location of Drive

26

BBA 111 CAL 13 December 2021


Command to see all the content or
folder in the directory output

27

BBA 111 CAL 13 December 2021


Directory Related Commands
• MD:- (Make Directory)- This command allows to create a
new directory.
Syntax:- C:\> MD <Dirname>
• CD:- (Change Directory):- We can enter or exit from any
directory using this command.
Syntax:-C:\> CD..
• RD:-(Remove directory):- This command is used when we
want to remove any unusable directory form our disk.
Syntax:- C:\> RD <Directory name>

28

BBA 111 CAL 13 December 2021


Command to create directory

29

BBA 111 CAL 13 December 2021


Command to create directory (New Folder
in the drive)
Syntax
• MD Directory Name (Press Enter)
Input
• MD Rdias (Press Enter)
Output
• A new folder will be formed in f drive as we are
working in f drive

30

BBA 111 CAL 13 December 2021


Command to create directory (New Folder
in the F drive) output

31

BBA 111 CAL 13 December 2021


Command to enter into the new directory
(RDIAS)that has been created recently
(New Folder in the drive)

32

BBA 111 CAL 13 December 2021


Command to enter into the new directory
(RDIAS)that has been created recently
(New Folder in the drive)
Syntax
• CD Directory Name (Press Enter)
Input
• CD RDIAS (Press Enter)
Output
• You will directly enters into the directory

33

BBA 111 CAL 13 December 2021


Command to enter into the new directory
(RDIAS)that has been created recently
(New Folder in the drive)Output

34

BBA 111 CAL 13 December 2021


Command to come out from directory
(RDIAS)that has been created recently
(New Folder in the drive)

35

BBA 111 CAL 13 December 2021


Command to come out from directory
(RDIAS)that has been created recently
(New Folder in the drive)

Syntax
• CD .. (Press Enter)
Input
• CD ..(Press Enter)
Output
• You will out from the directory. It could be new or old
directory anything
36

BBA 111 CAL 13 December 2021


Command to come out from directory
(RDIAS)that has been created recently
(New Folder in the drive)

37

BBA 111 CAL 13 December 2021


Command used to exit from all directories
and reaches to current drive.

Syntax
• CD\ and (Press Enter)
Input
• CD \ and (Press Enter)
Output
• You will exit from all directories and reaches to current
drive.

38

BBA 111 CAL 13 December 2021


Command used to exit from all directories
and reaches to current drive output.

39

BBA 111 CAL 13 December 2021


40

BBA 111 CAL 13 December 2021


Command to remove any unusable
directory form the disk
Syntax
• RD <Directory name>
Input
• RD <Directory name>
Output
• This command will remove any unusable directory form
the disk.

41

BBA 111 CAL 13 December 2021


Command to remove any unusable
directory form the disk

42

BBA 111 CAL 13 December 2021


Drive Related Command
• Drive name : (press enter) : To change drives in MS-DOS or
to move into the different drive of the computer . Type the
drive letter followed by a colon
• Syntax Drive name : (press enter)

• Wmic logicaldisk get name : this command is used obtain a


list of all disk drives in a computer
• Syntax Wmic logicaldisk get name and press enter

43

BBA 111 CAL 13 December 2021


How to go in the different drive of your
computer
Syntax
• Drive name : (press enter)
Input
• Drive name : (press enter)
Output
• The command will help into the different drive of the
computer or it will help you to change the drive location.

44

BBA 111 CAL 13 December 2021


How to go into different drive of your
computer: Output

45

BBA 111 CAL 13 December 2021


Command for total number of drives in the
computer

46

BBA 111 CAL 13 December 2021


Command to know total number of drives
in the computer
Syntax
• Wmic logicaldisk get name and (press enter)
Input
• Wmic logicaldisk get name (press enter)
Output
• The command to get total number of drive in the computer

47

BBA 111 CAL 13 December 2021


Command for total number of drives in the
computer: Output

48

BBA 111 CAL 13 December 2021


Lets test

• Write the command to open a MS Dos?


• Which command is used to displays number of directories ?
Please run that command on the computer?
• Which command is used to exit from current working
directory? Please run that command on the computer?
• Which command is used to exit from all directories and
reaches to current drive? Please run that command on the
computer?
• Write a command to Change current drive C: to D: drive.?

49

BBA 111 CAL 13 December 2021


Lets test
• "Create a folder name Fruits in the current C drive. Once
opening that folder create another sub - folder by the name
Citrus under the folder Fruits. After opening that citrus fruits
create another sub – sub folder oranges "
• a).Which command will be used to create Fruits folder or
Directory in the Drive C?
• b). How create e sub – folder Citrus under the major folder
Fruits Name?
• c).How will he create sub- sub – folder oranges "
• under the sub – folder Citrus and major folder Fruits ?
• d).Which command will be the used he wants to delete
Folder oranges?
• e).Which command will be used to create sub- sub - folder
limes after deleting the sub – folder Citrus Fruits and major
50
folder Fruits?

BBA 111 CAL 13 December 2021


File Related Commands

• COPY CON:- This command gives the facility to create a


new text file.
• Syntax:- C:\> COPY CON <Filename>
• TYPE:- This command is used to display the contents or
text of any file to the display device.
• Syntax:- C:\> TYPE <Filename>

51

BBA 111 CAL 13 December 2021


Command to create a new text file

• COPY CON:- This command gives the facility to create a


new text file.
Syntax:- C:\> COPY CON <Filename>

• To created a file, the following steps are : (Most


Important)
• Type Copy Con (Filename) and press Enter.
• Type whatever is to be typed in the file.
• Press F6 function key or CTRL + Z keys ‘^Z’ will be
displayed on the screen, which indicates that the file
is complete.
• Press Enter and after that the DOS will save the file
and will display the message ‘1 File(s) copied. 52

BBA 111 CAL 13 December 2021


Command to create a new text file

Syntax
• COPY CON <Filename> (press enter) ****
Input
• COPY CON <Filename> (press enter)
Output
• The command will help to create a new text file

**** Please refer to above slide to know how to create file


in MS DOS

53

BBA 111 CAL 13 December 2021


Command to create a new text file output

54

BBA 111 CAL 13 December 2021


Command to create a new text file output

55

BBA 111 CAL 13 December 2021


Command to display the contents or text
of any file to the display device.

Syntax
• TYPE <Filename> (Press Enter)
Input
• TYPE <Filename> (Press Enter)
Output
• The command will display the content or text of any file to
the display device.

56

BBA 111 CAL 13 December 2021


Command to display the contents or text
of any file to the display device output

57

BBA 111 CAL 13 December 2021


External Commands

• These external commands are for performing advanced


tasks and they do need some external file support as
they are not stored in COMMAND.COM

• External commands are known as Disk


residence commands.

• All executable files with extension .com, .exe, and .bat


are the external commands.

58

BBA 111 CAL 13 December 2021


Some important external commands are:

MORE MOVE FIND DOSKEY


FORMA
MEM FC DISKCOPY
T
SYS CHKDSK ATTRIB
XCOPY SORT LABEL

59

BBA 111 CAL 13 December 2021


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.
Syntax:- C:\> TYPE <File name> | MORE
C:\> TYPE ROSE.TXT | MORE
or
C:\> DIR | MORE

2. MEM
This command displays free and used amount of memory in the
computer.
Syntax:- C:\> MEM
the computer will display the amount of memory.
60

BBA 111 CAL 13 December 2021


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.
Syntax:- C:\> XCOPY < Source dirname > <Target dirname>
C:\> XCOPY TC TURBOC 61

BBA 111 CAL 13 December 2021


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.
Syntax:- C:\> MOVE <file name> <path name>
C:\SONGS> MOVE *.MP3 C:\ SONGS\OLD SONGS\

C:\>

6. FC
(File Compare) This command is capable for comparing two set of
files and display difference between two files.
Syntax:- C:\> FC <First set of file> <Second set of file>
C:\> FC ROSE.TXT GULAB.TXT

62

BBA 111 CAL 13 December 2021


7. CHKDSK(Check disk)
This command is used to check the status of a disk and show the
report of result status.
Syntax:- 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.
63

BBA 111 CAL 13 December 2021


9. FIND
The FIND command is used to search a file for a text string.
Syntax:- C:\> FIND "String to search" <File name>
C:\TEST>find "office" gulab.txt

---------- gulab.txt
A clock in a office can never get stolen

10. DISKCOPY
DISKCOPY copies the contents of a floppy disk to another.
Syntax:- C:\> DISKCOPY <Drive1> <Drive2>
C:\> DISKCOPY A: B:
This command will be copy all contents of A drive to B drive.

64

BBA 111 CAL 13 December 2021


11. ATTRIB
Sets the various type of attribute to a file. Like Read only, Archive,
Hidden and System attribute.
Syntax:- C:\> ATTRIB [± r] [± a] [± h] [± s] <File name>
here r - for read only, a- for archive, h - for hidden, s - for
hidden attribute.
C:\> ATTRIB +r Gulab.txt
This command will change the attribute of file gulab.txt to read only
mode. To remove the read only attribute we will follow this command.
C:\> ATTRIB -r Gulab.txt

12. LABEL
If you are not happy with the volume label of hard disk, you can
change it.
Syntax:- C:\> LABEL
C:\>LABEL
Volume in drive C is JAI
Volume Serial Number is 3E42-1907 65
Volume label (11 characters, ENTER for none)? INFOWAY

BBA 111 CAL 13 December 2021


13. DOSKEY
Once we install doskey, our dos will start to memorize all
commands we uses. We can recall those commands using up or
down keys. It also gives the facility to create macros, which
creates a short key for long keyword or command.

Key function for Doskey are given as-

UP,DOWN arrows recall commands


Esc clears current command
F7 displays command history
Alt+F7 clears command history
selects a command by
F9
number
Alt+F10 clears macro definitions
66

BBA 111 CAL 13 December 2021


Syntax:- C:\> DOSKEY
DOSKey installed
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

67

BBA 111 CAL 13 December 2021


14. FORMAT
This command creates new Track & Sectors in a disk.
Syntax:- C:\> FORMAT [drive name] [/S]
C:\> FORMAT A:
this command will create new track & sectors.
C:\> FORMAT A: /S
This command will transfer system files after formatting the disk.

68

BBA 111 CAL 13 December 2021


THANK YOU

69

BBA 111 CAL 13 December 2021

You might also like