FileExists is used to check file existance, why should it be used to check file locking state? You can alsways test for lock state if you attempt to open it with FileOpen statement. If that operation fails then the file is locked, on success just close the file. Here is how Dim locked, boolean, TRUE Dim file_number, number OnErrorGoto AFTER_CHECK FileOpen "my file", "StreamMode", "Read", "", file_number Set locked, FALSE FileClose file_number AFTER_CHECK: OnErrorStop // now you know whether it is locked or not MessageBox locked : It appears that the FileExists command does not see : a file as locked when the file is locked by another : process in 24x7. As a result, the process needing : the file cannot access the file. Could one of the : following be done: 1. Could the FileExists be changed to detect a locked : file by another process in 24x7? : 2. Is there a way to lock the file so that the : FileExists command can see that it is locked in another : 24x7 process? I noticed that the FileOpen has a : filelock argument that is not explained. : If anything, please update the documentation to be : clear about this problem with FileExists.
|