> Create an "excludesfile" to specify to <zip> that contains that latest 10
> files. How you do that is up to you, depending on how portable you need it
> to be. Eg, if your logs are on a Unix box, you could do something as
> simple as <exec> a 'sh' that runs (in the log-file directory):
> ls -lt | grep -v -e "^d" -e "^total" | head | awk '{print $NF;}' > ex.logs

Yeah, this is what I though of, too.
I just wanted to know if that's possible with stock Ant. Obviously not.

>
> If you need more portability, and you know Java, you could write a task to
> do it (should be pretty straightforward to do). Or write a perl script,
> etc.

I think I'm going to add a "datefilter" element to the <fileset> where you
can
specify a date or a timespan and a comparison function (one of "before",
"equals" and "after").
I'll post it to the ant-user list, if anyone wants this functionality, too.

Ingmar

Reply via email to