Chapter 6 /
Command
Reference
• As files
are
replaced or added, REPLACE displays the file-
names on
the
screen; when
the
replace operation is complete,
the
screen shows:
NNN
flle(s)
added/repaced
or
No
files
added/replaced
•
You
cannot use
the
REPLACE command to update hidden
files or system files.
•
If
REPLACE encounters
an
error,
it
returns
one
of
the
follow-
ing
errorlevel codes:
I I
L.J
,
I
,-=--'
: ,
\ )
I
'-..J
You
can
test
for
these codes by using
the
errorlevel option
with
the
batch
processing
If
command.
Examples
Suppose your
hard
disk, Drive
C,
contains several files of elient
names
and
phone numbers.
To
replace these files
with
the
latest
version of
this
file
that
exists
on
the
disk
in
drive
A,
you would
type:
1
2
3
5
8
15
Other
Command line error
File Not Found
Path
Not Found
Access Denied
Insufficient Memory
Invalid Drive '
Standard
MS-DOS error
, I
I
I
~
I
....J
I
U
I I
LJ
replace
a:\phones.cli
c:\
/5
This command replaces every file on Drive C
that
is named
Phones.eli (in different directories)
with
the
file Phones.cli from
the
root directory on Drive
A.
Suppose you
want
to add some new printer device drivers to a
directory called C:\MSTOOLS, which already contains several
printer driver files
for
a word processor.
To
do
this, you would
type:
replace
a:*.prd
c:\mstools
/a
This command.adds any files from
the
default directory of drive
A
with
an
extension of PRD
(that
do
not currently exist
in
the
\MSTOOLS directory on drive
C)
to C:\MSTOOLS.
156
, ,
LJ
I I
: I
'-..-J
, :
, I
'--.J