The documentation is outdated for FileExists. Since FileExists supports wildcards it is no more returns FALsE for locked files. To test for a locked file use the following code OnErrorResumeNext FileOpen .... as usual..., file_no OnErrorStop IfThen file_no, GO_TO_FILE_RPROCESS, GO_TO_FILE_LOCKED .... Note that if FileOpen fails to open a file, the returned file number is zero. You can then test for zero to find if the file opene operation failed. : FileExists is returning true even when the file is locked by another : application. The documentation states that FileExists will return false if : the file is locked. I keep getting error messages because I am trying to : use FileOpen on a locked file.
|