General information
Category:
Coding, syntax & commands
>Vfp 5.0a SP3
>In HELP for DELETE FILE, it says under Remarks:
>"The file you want to delete cannot be open when DELETE FILE is issued. The file name must include a path if it is on a different drive or volume, or in a different directory or folder from the default, and the file name extension must be included. The file name cannot contain wildcards."
>… but when my default is on drive C: and I issue the command "DELETE FILE D:\Temp\xxx*.*", all files in D:\Temp matching xxx*.* ARE successfully deleted. As it turns out, this is what I want to happen. I do have concerns, though, as the documentation seems to say that this capability is not supported.
>How safe am I to rely on this capability?
>Bob
read john's reply. you are both correct. the help in one place says you can use wildcards, and then it says you can not. wanted to also use "delete file" with wildcards. i got mixed results. sometimes it worked and sometimes it did not. i had a "close all" before the delete, so i know the file was not in use. did not look into the erase. i ended up using a ADIR with a loop that circled through the ADIR array and deleted each file individually.
arraynum=ADIR(aTemps,"_*.*")
FOR i = 1 TO arraynum
cFile=aTemps(i,1)
DELETE FILE &cFile
ENDFOR
brenda
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only