Home iWeb Logon Internet Meetings Contact Us Site Map

Z Programs

Z.dos.filename.valid


Arguments:       A = complete path

Returns:            {@error,@exists,@path}
where @exists is a flag, and @path is a valid dos path to the file, and @error
is a short message indicating why the filename is not valid
if wildcards are used, returns the first file that matches
if no matches, filename is considered valid, but no path returned
possible return value combinations and their interpretations:
@error         @exists @path      interpretation
------             -------   -----      --------------
  ""                ""      ""            valid name, file doesn't exist, wildcard used in arg
; ""                ""      defined    valid name, path to file returned
; ""                1       ""            valid name, wildcard used, >1 file matches pattern
; ""                1       defined    valid name, file exists
;(""                2       defined    valid name, wildcard used, only this file matches ptrn)
; defined        ""      ""            invalid name (invalid path, other error, or "error")
; defined        ""      defined    this case isn't used
; defined        1       ""           this case isn't used
; defined        1       defined    reserved file name, invalid for use (usually)
;
; from empirical results, this assumes that if DOS (i.e. $DOS.DIR) returns a "File not Found"
; error, that the filename is otherwise valid.

Posted: August 03, 2001

Return to list of Z Programs