Message
From
02/08/2003 12:26:09
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
02/08/2003 12:19:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00816200
Message ID:
00816203
Views:
23
Michel,

I have never tried this but you might try renaming the file instead of fopen(). You could wrap this in a try catch loop and if you get an error assume that it is in use. If rename is successful, then you know it was not in use and another user can't access the file.



>>Have you tried using FILE() to check for the file?
>
>Yes, this is a simplified version of the code. In the code here, we have IF FILE()... before ERASE. However, it is so close that even if IF FILE()... succeeds, by the time it reaches the ERASE line, it's too late.
Previous
Next
Reply
Map
View