MS-DOS
INTERNAL AND EXTERNAL COMMANDS
DOS
Commands:- There are two types of DOS-
commands:-
1.
Internal Commands.
2.
External Commands.
Internal Commands: The internal commands are the simplest, most commonly used commands.
There commands are automatically loaded into the computer’s memory when the
operating system dos is loaded into the memory. The internal commands are
available to the used even though they are not seen on the screen by the using
DIR command. Some commonly used internal commands are:-
* CLS *
COPY CON * RD * VER
* CD * Time * MD
* Date
* Ran
* Type * COPY
* VOL
* DEL * Prompt * Path
CLS: This command is used to clear the
screen or to start DOS command prompt at the top of the screen.
Syntax: x :\> CLS (Enter)
Where x is either A or B or C drive.
DIR: This command displays the list of
directories and files on the screen.
Syntax: c:\>DIR/switches (Enter)
Or
C:\>DIR<drive name (Enter)
Or
C:\>DIR/wild card (Enter)
C:\>DIR : It displays the list of
directories and files by scribbling.
C:\>DIR D : It displays the list of directories in drive
D.
C:\>DIR<file name> : It
displays the information of a specified file.
C:\>DIR/P
: It displays list of directories or files
page wise.
C:\>DIR/W : This command displays the directories or
files widthwise.
C:\>DIR/S : An user can display all the directories,
sub-diri\ectories, files within the current directories.
C:\>DIR/A r-h : This command displays read only files that are not hidden.
C:\>DIR<directory
or file name> : It displays a
directory of a specified disk drive.
C:\>DIR/O : It displays the file
list sored alphabetically.
The listing of directories and files is also done by using
wild cards. The wild cards are part of DOS commands. There are two types of
wild card-
i.
Asterisk
sign or star (*).
ii.
Question
Mark (?).
The command c:\>
DIR*.* will display list of all files and directories.
C:\>DIR*.
PAS : Displays all files having
extension PAS.
C:\>DIR
M*.* : Displays all files started
from first character M.
C:\>DIR\WS\*.* : Displays all files in the WORDSTSR
directory.
C:\>DIR ? AS.DBF :
Displays all Database files having any first character with AS remaining part of the Database file name.
C:\>DIR
??M.PAS : Displays all files having
extension PAS and
having any first two letter with third letter
as M.
Date: This internal command displays the
current system’s data. Also, an user can change the current data by using this
command.
Syntax: C:\>DATE(Enter)
Time: Using this command user can change the
current system’s time with new time.
Syntax: C:\> TIME(Enter)
VOL: This command is used to display the
volume label of a specific disk as given by the user. It is used to identify a disk
by displaying the volume of the disk. The volume name of a disk should not
exceed 11 character.
Syntax: C:\>VOL<drive
name>(Enter)
An user can see the volume of the hard disk using the volume
command as
C:\> VOL(Enter)
To see the volume of the current disk drive, the used has to
use the volume command as;
A:\>VOL(Enter)
VAR: By using this command user can know
the version of DOS being used currently.
Syntax: C:\>VER(Enter)
COPY CON: This command is used to create a file
which can not be modified.
Syntax: C:\>COPY
CON<file name>(Enter)
TYPE: This command is used to display the
content of a file either scrolling or by freezing. To freeze the screen, MORE
filer command is used.
Syntax: C:\>
TYPE <file name>(Enter)
C:\> TYPE <file
name>More(Enter)
To take a print of program written in C
C:\> TYPE <file
name>>PRN(Enter)
REN: This command is used to rename a
file.
Syntax:
C:\> REN<old file name> <new file name>(Enter)
DEL: This command is used to delete a
file.
Syntax:
C:\> DEL<file name>
C:\> DEL *.*(Enter) (to delete all
files)
C:\>
DEL *.c(Enter) (to delete a file written in C)
MD/MKDIR : These commands are used to create
a directory or sub-directory.
Syntax :
C:\>MD\<directory name> (Enter)
C:\>CD\<directory> (Enter)
C:\><directory>>MD<sub-directory>(Enter)