Fred,
Intresting thread. I don't know if you have solved your delima, but here is my two cents worth.
When dealing with special file names (this file is a nonstandard DOS file name) problem, enclose the file name in qoutes unless the space is not a space.
ERASE "c:\program files\microsoft visual studio\vfp98\vpf.exe"
IF FILE(["c:\program files\microsoft visual studio\vfp98\" + " Junk.dbf"])
The file name with spaces are converted into a "short" file name or standard DOS file, i.e., c:\progr~1\micros~1\....
If it is a special character trap the character using the ASC() function then create a string out of the results:
x = ASC(LEFT( < file name >,1))
y = "'" +x +'junk.dbf'
ERASE &y
Let us all know your solution.
Mark Holmes
P.S. There has been enought effort spent on this to hire a full time employee who's job description is to delete file that start with spaces.
Software engineers are trained to read and understand code; they are not trained in mind reading. Document the purpose not just the functionality.