Fcreate create a file without the leading space.
Fopen and Fwrite don't treat file names, just content.
Erase &cFileName is like Erase (2 spaces) filename and is treated like 1 space
FileToStr reads the file properly
Still no way to delete or rename the file
>>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".