> The legacy code I have inherited assigns random generated file names using
> the sys() function that does that (21, maybe?) to the tmp files and neither
> of the commands you suggested support wildcards.
>
> Com'on I need one of your slick workarounds! :-).
As an alternative to using ADIR(), you might want to consider the
following:
m.lcFile = sys(2000,"C:\TEMP\*.TMP")
m.lcNotDeleted = ""
do while not empty(m.lcFile)
on error m.lcNotDeleted = m.lcNotDeleted + ","+m.lcFile
erase (m.lcFile)
on error
m.lcFile = sys(2000,"C:\TEMP\*.TMP")
enddo
if not empty(m.lcNotDeleted)
wait window "Unable to Delete: "+substr(m.lcNotDeleted,2)
endif