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