>Are you certain that the leading character is a space? I can get the following to work:
>
>cVar = 'this is dummy text'
>=STRTOFILE(cVar, ' JUNK.DBF')
>ERASE (' JUNK.DBF')
>
>with no problem under VFP6 with SP3 installed, at least under NT. I haven't tried it under Win9x.
When I run your code under Win95, VFP 6 SP3, the leading space is removed. I can create the file with a leading space using:
oFile = fCreate("C:\ junk.dbf")
fClose (ofile)
No native VFP code will delete this file. However, I can delete it through Explorer. So maybe there is an API funcion that can be used in VFP to remove these files.
Mark McCasland
Midlothian, TX USA