The
fileexist function determines whether a file exists.
file_name is either a string expression giving a file name or is a file handler declared in a
File statement in
PROC GLOBAL.
You can use the wildcard characters "*" and "?" in the file_name. In that case the function will determine whether any file matching the specification exists.
Prior to CSPro 6.2, the function determined whether either a file or a directory existed. The
direxist function must now be used to check for the existence of a directory.
The function returns a logical value of
1 (
true) if the file exists and
0 (
false) otherwise.