Friday, 14 December 2012

INTERNAL COMMAND

There are also called memory-resident commands. These commands are automatically loaded
into the computer’s memory during the booting process. They actually included in the
Command.com file. So these commands are executable immediately after getting the dos
prompt.

A few internal commands are

01. VER
02. VOL
03 DATE
04. TIME
05. CLS
06. DIR
07. MD
08. CD
09. PATH
10. RD
11. COPY CON
12. TYPE
13. COPY
14. DEL
15. REN
16.PROMT

A command can be given in Capitals or Small letters also. The internal commands can
execute immediately but External Commands require special files for their execution
without which it is not possible to execute them.

1. VER: - All O/S has its own edition number or release or version number. The version
number indicates which edition of O/S you are working on.

Syntax: VER <Enter>
Example: C:\> Ver <Enter>
Result will be: - Microsoft Windows XP [ Version 5.1.2600]

02. VOL: - It is used to display volume label and serial number of the current drive
Syntax: Vol [drive:]
Example: C:\> VOL

3. DATE: - Used to display the current system date and prompt for entering new date.
Syntax: Date <Enter>
Example: C:\> date <Enter>

4. TIME: - Displays the current system Time and prompt for entering new time.
Syntax: Time <Enter>
Example: C:\> Time <Enter>

5. CLS: - Clears the cluster screen.
Syntax: CLS <Enter>
Example: C:\> CLS <Enter>

6. DIR: - This command displays the list of directories and files with details like date of
creation whether it is directory or file etc.
Syntax: DIR <Enter>

Switches:
/p : To view one screen of files at a time.
/w : Displays only five column of filenames and directories.
/b : Display only file and directory.
/l : Display all the information in lower case letters.
/a — stands for attributes that are given below.
/-h - Hidden ( or not hidden) files
s/-s - System ( or not systems) files
d/-d - Directory ( or not Directory) names
r/-r - Read only( or not read only) files

Example:
DIR *.txt : Display all the files with extension .txt
DIR D???.* : Display all the files starting with D and having less than or equal to
four characters in the file name and any extension.
Here “?” And “*” are called “wild card character”.
“*” Stand for any number of the character
“?” Stands for nay one character.

07. MD OR MKDIR: -Used to create a new Directory or nested Directories.
Syntax: MKDIR OR MD [DRIVE:] PATH DIRECTORY NAME
Example: C:\> MD SAMS <Enter>

08. CD OR CHDIR: - This command allows you to change present directory to another
directory.
Syntax: CD [DRIVE:] PATH
Example: C:\> CD SAMS and press <Enter>

09. PATH: - This command defines a list of directories DOS Searches for external
commands.

Syntax: PATH (Display the current Search Path)
PATH; : - ( Clear the search path so DOS will search for external commands only in the
current directory)

10. RD: - To delete the empty directory.
Syntax: RD [DRIVE:] PATH
NOTE: -The directory must be empty when we use RD.
Example: C:\> RD SAMS and press <Enter>
Switches: - 1. /s – Remove with subdirectories and files.
2. /q – Don’t ask to confirm.

11. COPY CON: -We use this command to create a new file.
Syntax: COPY CON <FILENAME>
Example: C:\> Copy Con sams.txt <Enter>
Note: - Typing here and when you are done, press Ctr+Z or F6 key followed by Enter to
save the current document.

12. TYPE: - This command allows you to see the contents of an existing file on the
screen.
SYNTAX: TYPE <file name>
Example: C:\> TYPE SAMS

13. COPY: - Using this command you can make duplicate files of an exiting file from one
location to another or one directory to another with different name or exiting name.
SYNTAX: COPY < SOURCE FILE NAME> <TARGET FILENAME>
Example: C:\> COPY SAMS.TXT A:\TAJ
Example: C:\> COPY*.TXT +*.BAK TARGET FILENAME And Then Press Enter
Example: C:\> COPY SAMS.TXT C:\SAMS_1\FO\RECEPTION And Then Press Enter
You can also have the option to change the name of files as you copy it.
Example: C:\> COPYold.TXT C:\dos\new.txt And Then Press Enter

14. DEL/ERASE: This command removes one or more files from the disk or current
working directories.
SYNTAX: DEL filespec [/p] or ERASE filespec [/p]
Example: C:\> DEL C:*.BAK /P And Then Press Enter
Example: C:\> DEL abc And Then Press Enter
Example: C:\> DEL ????.COM And Then Press Enter
Switches: - 1. /p –confirmation 2. /q – In quit mode

15. REN: Used to change the name of the file or directory.
SYNTAX: REN <file name>
Example: REN sams sams1 <Enter>
Example: REN *.dat *.mst And Then Press Enter

16 PROMPT: This command allows you to customize the dos prompt.

SYNTAX: 1. PROMPT


Most people like to set their prompt to $p$g which display the current directory followed
by > sign.
Example: PROMPT $P$G <Enter>

17. TREE: - It is used to display directory structure of a specified directory graphically.
Syntax : TREE [drive:] [path] [/f]
[/F] : displays the names of the files in each directory.

No comments:

Post a Comment