1

I'm trying to create an ant build script that check specific directory, let's use /logs

and under /logs it include thousands log files and I would like to create this ant scripts that can delete the files and directory that older the specific time, lets say 90 days.

and I know the jobs for delete directories and files are belowing but is there a way to include the dates?

<delete>
<dirset dir="${basedir}" includes="files*" />
<fileset dir="${basedir}" includes="files*" />
</delete>

or I have to write the sh scripts that to find any files that older that 90 days as " find . -type f -mtime +90 -delete" and call this scripts from the ant?

Thanks

linkback
  • 33
  • 5
  • I had find this useful link which solved my question: http://stackoverflow.com/questions/1820722/nant-deleting-files-older-than-7-days-old Thanks – linkback Nov 13 '13 at 19:23
  • See: http://stackoverflow.com/questions/11531631/linux-removing-folders-older-than-1-year-and-more-than-3-files/11547287#11547287 – Mark O'Connor Nov 13 '13 at 21:40

0 Answers0