>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
FCLOSE(lnFH)
DELETE FILE (lcFileName)
ENDIF
--sb--