« Return to Thread: Sorting file name

Sorting file name

by Henry Suhatman :: Rate this Message:

Reply to Author | View in Thread

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@...
For additional commands, e-mail: user-help@...

 « Return to Thread: Sorting file name