DOS Fn 60H: Query TrueName
Compatibility: ◄Undoc► 2.0+
Expects: AH 60H
DS:SI ASCIIZ▲ string of a partial filespec
ES:DI buffer to receive ASCIIZ▲ fully-qualified "true name"
Returns: (none ??)
Info: This undocumented function converts a partial filespec into a
fully-qualified filespec. If the filename or ext portion
contains an asterisk (*) wildcard▲, it is replaced with a series
of question marks (?).
This is a quick way to convert an ambiguous filespec such as
MYFILE.TXT or D:MYFILE or even ..\DEC\ABC.DAT into a fully-
qualified ASCIIZ▲ filespec, suitable for use with many DOS fns.
The main idea is that if you change default drives or
directories, a name such as MYFILE.TXT will become invalid but a
name such as C:\OLD\OCT94\MYFILE.TXT will be correct.
Notes: ■ Though officially undocumented, this is so handy that it has
been widely discussed, even by Microsoft publications such as
MSJ. It should be OK to use this one.
■ The buffer at ES:DI must be large enough to handle the largest
possible path and filename (about 80 bytes).
■ This function does NOT confirm that the input value (at DS:SI)
is valid or if such a file exists. It simply parses the text
and creates a name that looks good. It saves you the need of
obtaining the current default drive and directory and
prepending them to the name, etc.
See Also: Directory and File Functions