DOS Commands notes
DOS Commands notes
Internal Commands: -
Internal Commands are those commands that are automatically loaded in memory
when operating system DOS is loaded into the memory. These are those commands for
which the code for executing them is stored in COMMAND.COM and they execute
without the requirement of any other file. When an internal command is issue by the
user, the transient portion knows what to do & executes that command
CLS :
Purpose:- Purpose of this command is to clear the display of the screen and redisplay the
DOS prompt at the upper left corner of the screen
Syntax: - D:\ CLS
when we type the CLS at the DOS prompt and press enter , the screen will be clear
DIR :
Purpose: - It displays the list of files and directories on the screen.
Syntax: - C:\ DIR
If we want to display the directories under drive D with directory name RAM containing
sub-directory sham which has some files then we type following :
D:\ DIR RAM\sham
DATE :
Purpose: - It displays the current date.
Syntax: - D:\ DATE
Enter new date ( mm-dd – yy)
If we change the date then write the current date……
VOL :-
Purpose: - Purpose of this command is to display the volume level and name of the volume
given by the user to a specific disk.
Syntax :- C:\ >vol drive name
If we want to see the volume of derive D we use the volume command.
C:\ >VOL D :
VER :-
Purpose: Purpose of this command is to display the version of the operating system used by
user.
Syntax :- C:\> ver
If we want to see the version of dos operating system in D drive then we use the version
command as
D:\>ver
And then it displays the version.
MD :-
Purpose: - The purpose of this command is used to make directory in various drivers.
Syntax :- C:\ md <drive name>
If we want to make directory in D drive. Name of directory is RAM.
The command used is D:\> MD >Ram
CD:-
Purpose:- The purpose of this command is to change the directory.
Syntax:- c:\ >cd <filename>
If we want to make a directory or file in any directory. Then we have to change the
directory. If we want to make a subdirectory of the name B.C.A. in directory of name
LIIT
Then C:\> MD LIIT
C:\> CD LIIT
C:\> LIIT>MD B.C.A
REN :-
Purpose: - This command is used to rename the file and folder.
Syntax:- C:\> REN <filename>
If we want to change the file ram then we use C:\> REN Ram
RD:-
Purpose: - This command is used to remove directory.
Syntax :- C:\>RD <filename>
CD:-
Purpose: - purpose of this command is to shifts the prompt one step back.
D:\ B.C.A.> cd..
EXIT:-
Purpose: - purpose of this command is to closed the command prompt.
If we want to close the open directory or file than we have to go in the file menu and
then in exit option.
Syntax:- C:\> EXIT
COPY CON:-
Purpose:- purpose of this command is to create a file.
Syntax:- C:\> copy con < file name . txt >
If we want to make a file BCA.txt then we use
C:\>copy con bca.txt
TYPE :-
Purpose: - the purpose of this command is to display the contents of a file.
Syntax:- C:\> Type BCA.txt
if we want to see the content of file ram then we use command as
C:\> Type Ram.txt
EDIT:-
Purpose: - this command is used to edit the content of file.
Syntax:- C:\> Edit filename
if we want to edit the content of file ram.txt then
C:\> Edit ram.txt
DEL :-
Purpose: - purpose of this command is to delete file .
Syntax:- C:\> DEL < file name >
If we want to delete the file BCA.txt then command is
C:\> DEL BCA.txt
TIME :-
Purpose: - purpose of this command is to display the time of display the time of
system and allow to change. If you want to change the time then enter time as 12: 32
Syntax :- C:\> Time
External Commands: - These commands are not permanent part of the memory. To execute
or run these commands, an external file is required. The external files used for the
execution of external commands are .EXE, .COM, .BAT. The external commands are used
for relatively complex jobs such as copying an entire disk into another disk to sort the
disk, to hide / de-hide the files and to optimize the memory space etc.
External commands are conventional program files. These files can be deleted, copied
and even renamed.
Some commonly used external commands are DISKCOPY, FORMAT, DELTREE, ATTRIB,
EDIT etc.
EDIT: It is an external command. It required EDIT .COM file for its execution. This
file utilizes 413 KB space of memory.
Purpose: The purpose of this command is to create to create a new file or modify the
contents of an existing file. Using this command user can display multiple lines and move
with in displayed text both vertically and horizontally.
Syntax: C:\EDIT filename. extension
Example D:\>EDIT gitu
ATTRIB: The attrib command is an external command .To execute attrib command
ATTRIB.COM file required. This utilizes 11,208 kb space in memory.
Purpose: The purpose of this command is to change the attribute of a file that is user
can use ATTRIB to make a file “read only” which prevents the file from change of
contents.
C:\backup c:\work\*.* d: /s
Example would create a backup of all the files and subdirectories in the work directory and
save the backup to the d: drive.
CHKDSK: these external commands it requires CHKDSK.EXE file for its execution
and takes 12,241 bytes for its storage.
Purpose: This command returns the configuration status of the selected disk. It
returns the information’s about volume serial, total space, number of bytes in each
allocation unit.
Syntax: C:\CHKDSK <<Drive Name>>
Example C:\CHKDSK A:
DOSKEY: It is included in the DOS after the version 5.0 .The file required to
execute this command is DOSKEY.COM and space required is5861 bytes.
Purpose: It is the key to display the history of the DOS command typed by the user
using the keyboard.
Syntax : C:\>DOSKEY\OPTIONS
Example C:\>DOSKEY\DR (DR = Directory)
TREE: It require TREE.COM file to its execution and 6945 bytes of storage space.
Purpose: It displays the list of directories and files on specified path using graphical
display.
Syntax : C:\>TREE <path>/Switches
Example C:\TREE D :