Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
41 views

DOS Commands notes

Uploaded by

deju
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

DOS Commands notes

Uploaded by

deju
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

DOS Commands:-

Types of DOS Command: -


 Internal Commands
 External Commands

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

Various Internal Commands are :


CLS , DIR ,VOL , Copy Con , Type , REN , MD , DEL , CD , RD , Copy ,
Path

 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.

Syntax: ATTRIB -R | +R | -S | +S | -H | +H | -C | +C filename

Example D:\ATTRIB –R Raj 


+A: - add archive attributes
-A: - remove archive attribute
+H : - add hidden attributes
-H: - remove hidden attribute
+R: - add read-only attributes
-R: - remove read-only attribute
+S: - add system attributes
-S: - remove system attribute
 BACKUP: The file required for execution of this command is BACKUP.exe and it
utilizes 35715 kb space of memory.
Purpose: The purpose of this command is to store the various important files
from fixed disk to floppy disk as a precaution from the various crashes which
occurs to hard disk due to various reasons. Syntax: BACKUP [Source:\
Path\Filename] [Target:] [/s] [/m] [/a] [/d:date] [/t:time] [/f:size]
/s Makes a backup of all files, directories, and subdirectories in the specified source
location.
/m Backup all files that have changed since the last backup.
/a Adds a new backup file to existing backups instead of overwriting them.
/ Backup files that have been created or modified since the date specified.
d:dat
e
/ Backup files that have been created or modified after this time.
t:time
/f:size Create backup files in a specific size so they can be saved to an external storage such
as a floppy disk drive.

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: 

 DISKCOMP: It is an external command and requires DISKCOMP.COM file for its


execution and occupy the 10748 bytes of the storage space.
Purpose: its purpose is clear from its name i.e. comparisons of disks. This command
is used to compare the contents of two floppy disks to find out whether they are identical
or not.

Syntax: C:\DISKCOMP<<Source disk path>><<Target disk path>>



Example C:\>DISKCOMP A: B: 

 DELTREE: It is an external command and DELTREE.COM file is required for its


execution and space required for this is 11,111 bytes.
Purpose: It is used to delete files and directories same as by DEL and RD commands.
It completely removes the specified directory from the disk with all its files and
subdirectories.
Syntax : C:\DELTREE <path> 
Example C:\DELTREE C:\ WordStar  (it will delete with confirmation (Y/N))
C:\DELTREE C:\ WordStar / Y  (it will delete without confirmation )

 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 : 

You might also like