Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if a file or documents is in used?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01034302
Message ID:
01034306
Views:
16
>Is there an API call that determines if any certain file type is being in used?

You can use FOPEN.
lcFileName = GETFILE()
lnFH = FOPEN(lcFileName, 12)
IF lnFH > 0
  =FCLOSE(lnFH)
  * Ok to work with the file
ELSE
  * The file is open somewhere exclusively
ENDIF
Check also Who opened what files on the network? (modified to use only VFP code) FAQ #7896
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform