Michel,
You might need a short delay between the fclose() and the erase to let the OS fully commit the close. Of course in that time the file might get opened by something else again...
Can you just empty the content using fchsize()?
>I am using FOPEN() to see if I can get a handle to read write a specific file. The coding is like this:
>
>
>lnHandle=FOPEN(gcClientFat+'StyleSheet\'+PADL(gnMember,6,'0')+lcNextItem+'.css',12)
>IF lnHandle>0
> FCLOSE(lnHandle)
> ERASE (gcClientFat+'StyleSheet\'+PADL(gnMember,6,'0')+lcNextItem+'.css')
>ENDIF
>
>
>But, even with that in place, even if the handle is ok, I still, sometimes, can't erase the file. Anybody knows what I am doing wrong?