Chapter
1
I
System
Calls
Rename
Rename File Function
Call
17H
Changes the name
of
a file. The current drive code and filename
occupy the usual position in the file’s FCB, and are followed by a
second filename at offset 11H. (The
2
filenames cannot be the
same name.) The disk directory is searched
for
an entry that
matches the first filename, which can contain the
?
wildcard
character
.
If a matching directory entry is found, the filename in the direc-
tory entry is changed to match the second filename in the modi-
fied FCB. If the
?
wildcard character is used in the second
filename, the corresponding characters in the filename
of
the di-
rectory entry are not changed.
Entry Conditions:
AH
=
17H
DS:DX
=
pointer to the FCB containing
the
current and
new
Exit Conditions:
If AL
=
BBH,
a
directory entry was found.
If AL
=
FFH, no directory entry was found
or
no match exists.
Macro
Definition:
filenames
rename macro fcb,newname
mow
dx,offsetfcb
mov
ah,l7H
int
21
H
endm
64