ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Suhatman <he...@jawasoft.com>
Subject Sorting file name
Date Fri, 19 Jun 2009 23:15:36 GMT
Hi all,

I have use foreach task from ant-contrib, the output like this
1.sql
10.sql
11.sql
2.sql

And, i want to sort file name like this:
1.sql
2.sql
10.sql
11.sql
----------------------------------------------------------------------------
This is my code :
----------------------------------------------------------------------------
<project name="check" default="testing">
    <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
    <target name="testing">
        <foreach param="file" target="loop">
            <path>
                <fileset dir="army">
                    <filename name="*.sql" />
                </fileset>
            </path>
        </foreach>
    </target>
    <target name="loop">       
        <echo>${file}</echo>
    </target>
</project>   
-------------------------------------------------------------------------------

What should do to solve this problem?

Thanks & Regards,



Henry

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


Mime
View raw message