Sergey,
Check my reply in the same thread, please. I made the same suggestion.
>You don't have to change the current folder at all
>
>lcFolder = ADDBS("c:\tmpfox\")
>FOR i=1 TO ADIR(laFiles, lcFolder + "*.*")
> ERASE (lcFolder + laFiles(i,1))
>ENDFOR
>
>
If it's not broken, fix it until it is.
My Blog