Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I delete a file with a leading space?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00255531
Message ID:
00255824
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform