Chapter 6 / Command Reference
This
batch
file checks to see
if
a file exists before copying it.
Suppose Newfile.asm exists
in
the
root directory of Drive
B,
and
you execute
the
batch file by typing:
Chekdest
B:
\
oldfile.asm
newfile.asm
I
ENTER
I
As instructed in the command line, the batch file replaces
%1
with
B:,
making
Drive B the current 'drive.
It
then
replaces
%2
with
\,
making
the
root directory
the
current directory. Finally,
it
replaces
%3
with
Oldfile.asm and
%4
with
Newfile.asm.
The batch file checks to see
if
Newfile.asm exists
in
the
current
directory.
If
it
does,
the
batch file uses
the
TYPE command to
display Newfile.asm. Then
it
pauses.
If
you want to
copy
over
Newfile.asm, press
the
space bar.
If
not, press I
CIRL
I
en
If
Newfile.asm does not exist in
the
directory, the batch file goes
to
the
line following
:G.
Therefore,
it
does
the
copy
automatically,
without pausing.
106
1 ;
1
1 1
l.-J
; )
u
1 J
1 I
LJ
\ )
1 1
U
1 :
• I
I '
L.-....J
I i
I 1
e-J
I I
U
I '
i.J
J
1 I
---'