Isfile(Function)
Checks for the existence of a file and its attributes.
Parameters
<File Path Name>
|
The file path to be checked (character string type).
|
Return Value
Returns the value of the integer.
The content of the value is as listed below.
0: The file does not exist.
1: It is a file.
2: It is a directory.
Description
<File Path Name>: Always specify an absolute path with the drive name included.
Returns 0 when the Memory Card has not been attached.(This is the same as when no file exists)
When a file specified by open, etc. does not exist, it becomes an error so the presence of a file should be checked first by using isfile.
Example
Confirm the presence or absence of [/c0/input.dat] and read in data.
if Isfile("/c0/input.dat") <> 1 then
print "No file"
endif