ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Counting files from within ant
Date Fri, 12 Oct 2001 20:28:41 GMT
--- Euan Guttridge <EGuttridge@buildonline.com> wrote:
> My ant script fetches a group of labelled files for release, but I would
> then like to be able to **count recursively from a root directory the
> number of files fetched** - and compare this with the number supposed
> to have been fetched (as an integrity check), all within the ant script.
> Aside from using Perl or Windows Scripting Host, can anyone think of an
> easy(er) method??

How platform-independent do you need to be? If you're unix-only, you could
just <exec> a 'sh -c "find . -type f | wc -l"' with the "outputproperty"
attribute set, then use <condition> (assuming you're running 1.4) to
compare the value of your "integrity check" property with the
"outputproperty" property.

Diane  

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Mime
View raw message