Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I delete a file with a leading space?
Message
From
19/08/1999 21:37:20
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00255531
Message ID:
00255658
Views:
18
>I've tried to simulate your problem here but can't get the file to save with a space. Anyway, I was going to try two things.
>
>1) try macro substitution
>
>m.f = " file.txt"
>ERASE &f
>or
>DELETE FILE &f
>
>2) use the DOS copy command to remove the space then delete it. The foxpro copy command might also work instead of shelling to DOS.
>
>copy ?file.txt _file.txt
>ERASE _file.txt

Hi Benjamin,

The macro substitution doesn't work.

A problem with this is the file is " _99CA.DBF" and there are 12 other files in the directory "JUL_99CA.DBF", "AUG_99CA.DBF", "SEP_99CA.DBF", etc.. and a wildcard may not hit the file I'm after.
Jim Philippi

quando omni flunkus moritati
Previous
Reply
Map
View

Click here to load this message in the networking platform