FileExists Function
Checks if a file exists.
Syntax
FileExists ( filename )
Parameters
- fileName
- Specify the name of the file to be checked as a string. The drive and path can also be included. If only file name is specified, the file in the current directory is displayed. See ChDisk for the details.
Note
A network path is available.
Return Values
- True if the file exists
- False if the file does not exist
See Also
FolderExists, FileLen, FileDateTime$
FileExists Function Example
String myPath$
myPath$ = "c:\TEST\TEST.DAT"
If FileExists(myPath$) Then
Print "Last access date and time: ", FileDateTime$(myPath$)
Print "Size: ", FileLen(myPath$)
EndIf