Está en la página 1de 5

External Commands

A MS-DOS command that is not included in command.com. External commands are


commonly external either because they require large requirements and/or are not
commonly used commands.
There are certain DOS commands that are not available along-with DOS,
i.e., these are available as separate command or executable files that has
to be hired from third party (software vendors).
ATTRIB Command
Every file on the disk has its own description like size, space occupied,
the type, the date it was made etc. One of those descriptions is the
attribute. The attributes of a file indicates whether it is a
i) Read-Only file
r
ii)
Archive file
a
iii) Hidden file
h
iv)
System file
s
With the ATTRIB command the user can check the attributes of a file,
Syntax:
ATTRIB
[filename]
With the ATTRIB command the user can reset the attributes of a file,
Syntax:
ATTRIB
[r][ a][ h][ s][filename]
+r,-r : using +r sets the read only attribute, and r turn off the read only
attribute.
+a,-a : using +a sets the archive attribute, which is used to indicate that
a
file
has been changed and a turns this attribute off.
+h,-h : using +h gives hidden attribute to files. After issuing this switch
the
user cannot see this file on the screen using DIR command and h
turns off this switch.
+s,-s : this attribute indicates special file. This is reserved for DOS itself.
The
user cannot use this.
While creating a new file every file gets read only and archive attribute
by default.
CHKDSK Command (Check the structure for errors disk)
This command may be used to check the extent of damage and
usability on a floppy. The command checks for consistency and errors,
like a secretary proof reading a letter. The disk status report is displayed
after checking is done.
Syntax:
CHKDSK [drive:]

DELTREE Command
This command is used for deleting an entire directory no matter in that
directory have a file or another subdirectory and also it will delete
hidden files. So DELTREE command will erase a directory along with all
contained subdirectories and files, in a single step. In its basic format
the command requires confirmation, which can be very useful in
preventing the user from making a mistake in haste. The user can force
DOS to skip the confirmation step by using the /y switch.
Syntax:
DELTREE [drive:][path] directories[/y]
When the user issue this command and press <Enter> then it will ask
for confirmation [Y/N]: And when the user include the switch /y, the
command will delete the entire directory without confirmation. But it is a
bit risky.
C:\>DELTREE A:\ABC
and press <ENTER>
DISKCOPY Command
Sometimes the user wants to copy the contents of one floppy disk to
another. This command copies, the entire files, exactly as they are on
the source disk on to the destination disk. The destination disk or the
disk where files are to be copied, may or may not be formatted because
before copying the files, on to the disk DISKCOPY command reformats
the disk and then copies all the files on to it.
Syntax:
DISKCOPY [drive1: [drive2:]]
If the user is working on a double floppy drive computer then the user
types at the system prompt
C:\>DISKCOPY
A:
B:
and press <ENTER>
This copies all the files in drive A: to the disk in drive B. If the user is
working on a single floppy drive computer then the user types
DOSKEY Command
This command is used to make DOS remember all the commands that
the user enters. When the user types a command and after executing it
the job is done and the user gets the DOS prompt again. Now when the
user wants the same
command to be done he/she can use right arrow key or F1 key or F3
key instead of typing it again. This way Dos can remember the previous
one command the user has entered. But in order to make DOS
remember all the commands the user enters the user will have to load a
DOSKEY utility.
Syntax:
DOSKEY and press <ENTER>
After pressing the ENTER key it will load the file in RAM and it uses about
4 K of memory. It will be present in RAM till the time the computer is
turned off or DOS is exited. It is also called Memory Resident or TSR

(Terminate and stay Resident Program). After loading DOSKEY, DOS


displays a message on the screen:
DOSKEY Installed.
Now when DOSKEY is in memory, it can help store all the commands
which the user enters so that any of those commands need not be typed
again to be executed. And this all are present in memory that area called
HISTORY LIST.
C:\>DOSKEY
/History or /h
and press <ENTER>
Displays all command from the history list on the screen. the user can
easily use this history list to a batch file feature:
C:\>DOSKEY/h
> PRACHI.BAT
and press <ENTER>
Recalling Commands: Some keys are provided to recall recent
commands the user has run since installing DOSKEY:
Keystroke
Up arrow ()
Down arrow ()
Page up
DOSKEY
Page down
executed
F7
complete
F9
Alt+F7
ESC

Effect
Displays the preceding command and further list
Shows the next command the user executed
after
the
one
thats being displayed.
Display the oldest command that is still in
buffer
Show the most recent command that the user
Display

entire list of recorded commands


with
identifying entry numbers.
Selects a command by its entry number
Erase the command history list
Clears the command line

EDIT Command
This command is used to open the DOS Editor EDIT which the user can
use to edit text files. It is used to open a new file or an existing file for
editing.
Syntax:
C:\>EDIT [filename] and press <ENTER>
MOVE Command
This command can move a file or a group of files from one directory to
another and also from one disk to another. Sometimes it is also used to
rename directories.
Syntax
:MOVE
[/y
or
/-y]
[d:][path]filename[,
[d:]
[path]filename[..]] destination
Moves one or more files to a new directory, destination.

Switches:
/Y
: Prompt before it overwrites while it copies file that already
exists.
/-Y :To write over existing files without asking first.
XCOPY Command
This command is faster than the COPY command and allows the user to
copy entire directories including all the subdirectories.
Syntax:XCOPYSource[target][/y/[/-y][/d:date][/p][/s][/e][/v][/w]
Source
name
provides
Target

: The name of the files that the user wants to copy. The
can
include DOS wild card characters (* and ?), if the user
a
path without a name DOS assumes copy all the files.
: This can be a drive letter, a path name, a file name, or any
combination.

Switches:
/-y
:
/y
:
/d: date :
the
/p
/s
/e
/v
/w
copy.

:
:
:
:
:

Prompts before copying over existing files.


Overwrites already existing files without prompting.
Only copies files that have been modified on or after
date
the user gives.
Asks before copying each file.
Copying files as well as specified directory.
Copying empty directory also.
Verify that each file is copied correctly.
Waits for the user to type a key before starting the

Lets say the user has just got a new hard disk, and the user wants a
copy of the
directory structures :
A:\>XCOPY

A:\DOS C:\DOS\ /s/e

SCANDISK Command
This command analyses and repairs logical and physical disk errors.
Syntax:
SCANDISK [drive:] /switches
Switches :
/ALL
:
Checks and repairs all non-network drives.
C:\>SCANDISK
C:
and press <ENTER>
The above command scans drive C for logical and physical errors.
FORMAT Command

This command is used to prepare a blank disk. It is used to create tracks


and sectors on the disk in order to copy a file.
Syntax:
FORMAT drive:

También podría gustarte