Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is A File Aready Open?
Message
From
13/10/2002 17:05:02
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00710752
Message ID:
00710768
Views:
42
Hi Sergey:

Doh. Why didn't I think of that. Thanks for the answer!

Best

>Hi Gary,
>
>You can try to open the file for Read/Write.
lnFH = FOPEN(lcRtfFile, 12)
>IF lnFH > 0
>  =FCLOSE(lnFH)
>  * Ok to work with the file.
>ELSE
>  * The file is open somewhere else
>ENDIF
>
>>Hi:
>>
>>I write to an RTF file that could be open in Word on the same workstation.
>>
>>Is there any way of testing whether the file is actually open, as far as Windows is concerned? If I knew the file was currently open, I could prevent the "write to" operation from within VFP until the file is closed by whatever application has it open.
>>
>>Thanks!
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform