Você está na página 1de 8

DOS

Versions of DOS
1) DOS Ver 1.0
2) DOS ver 2.0
3) DOS ver 3.0
4) DOS ver 4.0
5) DOS ver 5.0
6) DOS ver 5.1.26
DOS COMMANDS:
Commands -->giving instructions
2 types
1)Internal commands
2) External Commands

In MS-DOS there are two ways commands are executed.


An Internal command, which is a command embedded
into the command.com file, and an external command,
which is not embedded into command.com and therefore
requires a separate file to be used.
For example, if your computer does not have fdisk.exe
and you try using the fdisk command, you would receive
an error "Bad command or file name."
Fdisk is an external command that will only work if fdisk.exe,
or in some cases, fdisk.com, is present.

DOS Internal Commands:


The DOS (Windows 9x) internal commands are so-called because
their instructions are a part of COMMAND.COM, the DOS (Windows 9x)
command line interpreter.
Recall that COMMAND.COM is placed into memory each time the
DOS or Windows 9x OS is booted. Thefore, the internal
commands are always in memory and can always be executed
from any command line prompt.
This is in contrast to the disk-bound external commands,
which reside in secondary memory up until the moment they
are needed, at which time the OS must find them and load
them into primary memory.
The syntax for some frequently used internal commands follows.
TIME
Displays current time and allows it to be changed.
Syntax: TIME
DATE
Displays current date and allows it to be changed.
Syntax: DATE
CLS
Clears the screen.
Syntax: CLS
DIR
Shows directory information of a disket
te: name, size, and the
date and time stamp of files.
Syntax: DIR [d:][path]
Optional switches:
/p Display dir info and
pauses display when the screen is full
/w Display names and
extensions only in five columns
To display a file
directory listing for D:\LET\ANNUAL
D:\LET\AN
NUAL>DIR (from D:\LET\ANNUAL)
D
:\DATA>DIR \LET\ANNUAL (from D:\DATA)
C:\WINDOWS>DIR D:\LET\ANNUAL (from C:\WINDOWS)

COPY
Copies a file. Name of copy may be the same as original, or diff
erent.
Syntax: COPY [d:][path][name.ext] [d:][path][name.ext]
Optional switches:
/v Verify, copies the file and compares it with the
original
/b Binary file

To copy a file from D:\BATCH to the root of A


: drive
A:\>COPY D:\BATCH\CL.BAT
(from A: drive)
D:\BATCH>COPY CL.BAT A:\
(from D:\BATCH)

To copy a file from the r


oot of C: to A: drive and change its name
A:\>COPY C:\MSDO
S.SYS MSDOSSYS.BAK (from A:)
C:\>COPY
MSDOS.SYS A:\MSDOSSYS.BAK (from the root of C:)
To co
py all of the files from the root of A: to D:\CCV\ENGCOMP

A:\>COPY *.* D:\CCV\ENGCOMP (from A:)

D:\CCV\ENGCOMP>COPY *.* A:\ (from D:\CCV\ENGCOMP)

TYPE

Displays the contents of a file.

Syntax: TYPE [d:][path][name.ext]

To display the contents of the file MY.LET to the screen

A:\>TYPE MY.LET

DEL

Deletes a file from disk.

Syntax: DEL [d:][path][name.ext]

To delete one file:

A:\>DEL A:\MY.LET

To del all files in curr


ent directory

A:\>DEL *.*

REN

Renames a
file.

Syntax:
REN [d:][path][name.ext] [d:][path][newname.ext]
To
change the name of the file D:\LET\ANNUAL\99.DOC to 1999.DOC

D:\LET>REN ANNUAL\99.DOC 1999.DOC (from D:\LET)

D:\DATA>REN \LET\ANNUAL\99.DOC 1999.DOC (from D:\DATA)

C:\WINDOWS>REN D:\LET\ANNUAL\99.DOC 1999.DOC (from C:\WI


NDOWS)

MD

Makes (creates) a new directory.

Syntax: MD [d:][path][dirname]

To create a directory named HERMIT in the root


of D: drive

D:\>MD HERMIT (f
rom D:\)

C:\>MD D:\HERMIT
(from C:\)

RD

Removes an existing dire


ctory (directory must be empty).

Syntax: RD [d:][path]
[dirname]
To remove the HER
MIT sub-directory

D:\>RD HE
RMIT (from D:\)

C
:\>RD D:\HERMIT (from C:\)

CD

Changes the current directory.

Syntax: CD [path][dirname]

To make D:\HERMIT the current directory

D:\>CD HERMIT (from D:\)

D:\DATA>CD \HERMIT (from D:\DATA)

D:\DATA\SOURCE>CD \HERMIT (from D:


\DATA\SOURCE)

D:\DATA\SOURCE>CD ..
(from D:\DATA\SOURCE)

PATH
The PATH command is used to
help the command interpreter find

external commands which


are not in the current directory. The

command interpretter
looks into the

DOS environment for "


PATH=" and then searches the

paths (each separa


ted from the next by a semicolon) that follow.

Syntax: PATH=[
path;path;...]

To set the
DOS PATH:

PAT
H=C:\DOS;C:\PCW;\C:\BIN

To display the current path:

PATH
SET PROMPT

Used to specify the appearance of the DOS prompt.

Syntax: SET PROMPT= (from the command line)

PROMPT= (in a batch file)

To display current drive & current path follow


ed by ">" as prompt

SET PROMPT=$P$G

To display the current date, time,


and drive on separate lines

SET PROMPT $D$_$T$_$N$G

To redefine F9 to CD\W
indows\Start Menu\Programs\Startup
SET PROMPT $e[
0,67;"'CD\Windows\Start Menu\Programs\Startup'";13p

Você também pode gostar