>Originally, I set the current directory to the location of the file. I just tried from a parent directory and funny thing ...:
>
>I put the path in a variable then tried the other functions:
>
>ADIR still works, RENAME and ERASE still fail but FOPEN works.
>
>Go figure ...
>
>But this is an exotic curcumstance ... there should not be a space as the first character of a file ... Maybe that was the case in the one you remember ...
Adir() and fopen() read it, but those which have something to do to the file probably don't. Does FileToStr() work? If it does, you can still copy the file, and then open it with fopen() and than truncate it somehow? Would fCreate() work? You may end with a bunch of zero-length files, though, but erasing them manually once a month wouldn't be too hard.
The other exotic situation was about some strange device name, don't remember exactly what, but it should have behaved like a disk, but didn't. I remember that macro substitution, with macro within quotes, did work in that case. You may try that as well, i.e. erase "&cFileName".