>Does anyone have any sample code handy to wrap the StrToFile() function inside an error-tolerant wrapper, in case something else in the OS has it open? What I want to do is write to a textfile, and if it is already open for write, sit in a wait-suspend loop until it is available and then overwrite it. I am currently using a global Error Handler (from the awesome 1001 Things Hentzenwerke book), but I don't want to set that off with this operation.
You can use FOPEN() function to check if file is open somewhere else.
lnFH = FOPEN(lcFileName, 12)
IF lnFH > 0
FCLOSE(lnFH)
.....
ELSE
ENDIF
--sb--