ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gareth Thorburn" <>
Subject How obtain the number of files in a fileset ?
Date Wed, 06 Mar 2002 07:59:59 GMT

I'ld quite like to have a target which simply produces a count of the
number of .java files in my project.

Ideally, this would be a simple 'count' task which takes a fileset,patternset
or something similar to the javac task and then sets a property value to the
result. I'ld like then to be able to echo out some text displaying this value.

The echo requirement is because I have a large build involving many subprojects
and generally run ant with the -quiet option, to provide neater more compact

I've seen previous posts which have found a solution using OS specific
calls but I'm not going to go down that route.

Any ideas ?



Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message