ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Ant task to Count number of files in a directory
Date Fri, 26 Oct 2007 15:02:59 GMT
I think this might help:

http://ant.apache.org/manual/CoreTasks/resourcecount.html

Here's a snippet I just tested:

        <resourcecount property="count.jars">
            <fileset dir="${jar.dir}">
                <include name="*.jar"/>
            </fileset>
        </resourcecount>
        <echo message="There are ${count.jars} jarfiles in ${jar.dir}"/>

It's much cleaner than attempting to write a script.




On 10/26/07, Sujie <sujie_19@yahoo.com> wrote:
>
> Hi
>
> I would like to count the number of jar files in a directory.
> I am using ANT 1.7.
>
> Any help will be much appreciated.
>
> Thanks
>
> --
> View this message in context: http://www.nabble.com/Ant-task-to-Count-number-of-files-in-a-directory-tf4695926.html#a13423035
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message