MS-DOS
MS-DOS
stands for Microsoft Disk Operating System. It is a single-user operating
system for IBM and IBM-compatible personal computers. Microsoft and IBM
introduced it jointly in 1981. It was the most popular operating system for
personal computers in the 1980s. Because of its popularity, Microsoft later
took a decision to launch independently Microsoft Windows operating system in
1990s.
MS-DOS for Microsoft Operating System
is an operating system with a command-line interface used on personal
computers. You type MS-DOS commands using a command prompt window. MS-DOS
commands are typed at an entry point identified by a blinking cursor.
To open a command prompt, click Start menu, highlight All Programs choose Accessories, and then click Command Prompt.
There are two types of commands:
(1) Internal Commands-
(1) Date: This internal command display the
current system date.
Syntax- date ¿
Ex- The
current system date is MM\DD\YYYY
(2) Time: This
internal command displays current system time.
Ex.-H: M: S:
MS
Syntax- time ¿
(3) Version: This command shows the version of
MS-DOS and windows.
Ex-the latest
version of MS-DOS is 6.22
Syntax- ver ¿
(4) Volume: This command shows the volume serial number.
Syntax- vol ¿
(5) Cls: This
command is used for clear the terminal screen.
Syntax- CLS ¿
(6) Exit: This command is used for to exit from
MS-DOS.
Syntax- exit ¿
(7) Copy con: This command is used for create a new
file in MS-DOS.
Syntax- copy con <filename> ¿
Ex.-copy con
abc
Note- For save this file we use ctrl+z
or F6
(8) MD:
MD stands for making directory. This command is used to create a new directory.
Syntax- MD
<dir name> ¿
Ex.-MD
computer
(9) CD:
Cd stands for change directory. This command is used for changing the
current directory for specific directory.
Syntax- CD
<dir name> ¿
(10) CD..: This command is used to exit the
current working directory.
(11) CD\: This command is used to exit all
working directory
(12) Type: This command is used to open any
exciting file.
Syntax- type
<file name> ¿
(13) Ren (rename):
This command is use to change the name of any existing file.
Syntax- REN
<OLD FILE NAME> <NEW FILE NAME> ¿
OR
REN
C:\[D]\PATH\<OLD FILE NAME> C:\[D]\PATH\<NEW FILE NAME> ¿
(14) Copy: This command is used to copy the file
from specific directory to another drive or directory or in the same directory.
Syntax- COPY
<OLD FILE NAME> <NEW FILE NAME> ¿
OR
COPY C:\[D]\PATH\<OLD FILE NAME>
C:\[D]\PATH\<NEW FILE NAME> ¿
Note- In copy command second syntax is
use to copy a file to another directory.
(15) Del: This command is used to delete a
specified file.
Syntax- DEL
<FILE NAME> ¿
OR
DEL C:\[D]\PATH\FILE NAME¿
(16) Copy*.*: This command is used to copy all the
files of any directory into another directory or drive.
Syntax- COPY
C:\[D]\PATH\*.* C:\[D]\PATH ¿
(17) Del*.*:
This command is used to delete all the files of any specified directory before
deleting all the files this command give a conformation message.
SYNTAX –DEL C:\[D]\PATH\*.*
(18) Dir:
This command is used to show or display all the sub directory and files of any
specified directory/
(19) Dir\P:
This command is used to show all the files and dir in ascending order with page
vice. This command gives a message “Press any key to continue”. This command
gives all the information about created date, time, size etc.
(20) Dir\w: This command used to display all the
files or dir in width vice order. The command shows only the file or directory
name and not gives any information. In this command the dir name shows in
square bracket ( ) and file name shows simply.
Note-
\p is used to pause the page.
(21) dir\on: This command is used to display all
the files or dir in ascending order according to their primary name.
(22) dir\oe:
This command is used to display all the files or dir in ascending order
according to their extension name.
Syntax-dir\oe
(23) dir\od:
This command is used to display all the files or dir in ascending order
according to their created date.
Syntax-dir\od
(24) dir\os: This command is used to display all
the files or dir in ascending order according to their size.
Syntax-dir\os
(25) dir\oh: This command is used to show file in
any specific dir
Syntax-
dir\oh
(26) dir\s: This command is used to show all the
files and sub dir and all the sub dir’s files. This command scrolls the screen
and for breaks the scrolling used- Ctrl+c
(27) dir\l: This command is used to show all the
files and dir names in small letter.
Syntax- dir\l
(28) RD:
Rd stands for remove directory .This command is used for remove specified dir.
Before deleting any dir keep two thing in mind (1) empty the dir (2) and come
out from dir.
(29) Prompt: This internal command is used to
change the DOS prompts.
STRING MEANING
$D DATE
$T TIME
$V VERSION
$G >
$L <
$P PATH
$Q =
(2) External Commands-
(30) Label: This command used to show or change
the volume label name of any drive.
Syntax -Label¿
(31) Move: This external command used for two
purposes.
(1) As the
name suggests it move the file from one location to another.
Syntax- MOVE
C:\[D]\PATH\<FILE NAME> C:\[D]\PATH ¿
(2) This
command also renames a dir.
Syntax- MOVE
<OLD DIR NAME> <NEW DIR NAME> ¿
(32) X copy: This command is used to copy all the
files and subdirectory of any specific dir.
Syntax- XCOPY C:\[D]\PATH\ C:\[D]\PATH ¿
(33) Attrib: This command used to change the
attribute (properties) of any file.
Syntax –
attrib [-+r][-+h] [-+a] <FILE NAME>
(34) Sort: This command is used to arrange the
data of a file into ascending order.
Syntax –sort
<file name>
(35) Batch file: Batch file is a container of MS-DOS
external or internal command. The extension name of batch file is .BAT. In
batch file we store any DOS commands in a sequence and run it one by one.
Creating a batch file: We create a batch file by simple
using copy con command but with the extension .bat.
Ex.-copy con
xx.bat
Date
ver.
Time
To run a batch file: To run a batch file type batch file
name without extension and press enter key
(36) Tree: It shows the complete structure of
specified dir with their sub directory and if you want to show the files of the
sub dir use \F with tree command.
Syntax-tree
Or
tree\F
(37) Del tree: It deletes the complete structure of
specified dir including their sub dir and files.
(38) MEM: This command is used to display the
information about Memory.
Syntax-MEM
Wild card character: Wild card characters are used
whenever we refer to a family of a file instead of a single file.
(1)"?"-
Question mark represents the one character, suppose you want to see the files
which has only two character name.
Ex.-
dir??
(2)*-
Star mark show the list of character suppose if we want to list the entire file
which have extension .esc than the command is
Dir*esc
Help command: This command is used to display help
of any given command.
Syntax-
command\?
Edit: This command used for made the
changes and modification in existing file. It opens the editor screen which is
used for modification and we can also create a new file from it.
Syntax- Edit ¿