FileExists |
Top Previous Next |
Prototype
BoolExists:=FileExists(FileName)
Description
Checks if the file passed as parameter really exists.
Parameters
FileName: A string containing a valid path and filename.
Returned value
BoolExists: true or false logical value. If it returns true then file exists, otherwise it has not been found or it doesn't exists.
Notes
None.
Example
// Check if there is a file within the directory bExists:=FileExists ('c:\file.dat');
// Create a file if it doesn't exist If bExists=False Then CreateFile('c:\file.dat');
// Open the file strFile:=FileOpen('c:\file.dat');
// Execute other operations
// Close the file FileClose(strFile); |