Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FileSystemObject
Message
 
 
To
04/06/2002 12:51:21
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00664585
Message ID:
00664736
Views:
16
>Hi,
>I am using the FileSystemObject to delete a file.
>but before I delete it i want to check if it is in use by another user, since otherwise the system aborts.
>How do I check if a file is opened by another user with the filesystemobject?
>Id appreciate any help with this.

You can use local error handler or create wraper class to intercept that error. ALternatively, you can do it with VFP commands.
lnFH = FOPEN(lcFileName, 12)
IF lnFH > 0    && file isn't in use
  FCLOSE(lnFH)
  DELETE FILE (lcFileName)
ENDIF
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform