>VFP6 I have code to delete all the files in a folder greater than some number of days ago. But I also want to delete the folders that were created > than some number of days ago. How to do?
>
>>arraynum=ADIR(aTemps,ctables)
>FOR i = 1 TO arraynum
> if atemps(i,3)+20 < DATE()
> cFile=aTemps(i,1)
> DELETE FILE (cpath+cFile)
> endif
>ENDFOR
>
Hi Brenda, try with additional parameter for ADIR cAttribute = D
arraynum=ADIR(aTemps,ctables,'D')
So you receive also the folders.
HTH
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst