>Hi,
>
>I have a program that copies a table to excel format. Sometimes the client has a previous version of the spreadsheet open and VFP cannot create a new file of the same name. At this point I get the error 1111 Invalid File Descriptor.
>
>There is probably a way of determining if a file is open by another application, before trying to create a new one of the same name.
>
If you know you're going to blow away the old copy entirely IAC, what about using FCREATE() to open it low-level - if it works, FCLOSE() it and it's gone, and make your copy. IF FCREATE() fails, send the Corsican Brothers over to kick the user out, and repeat until it works.