If anyone is interested, I expanded upon my earlier example:
The above will work in scenarios such as:
1.sql, 10.sql, 011.sql, 02.sql
Just use "0" for the pad attribute...
On Wed, 24 Jun 2009,
Here is a snippet beanshell that can do the work for you:
I tested and it definitely works :)
To run, I did this:
The directory /home/sfloess/testdir contains the files:
10.sql 11.sql 1.sql 2.sql
The results w
Well, there is the
Yes it way to solve, but i don't want fill zero in first filename, if i
write new task i don't know where i had started :(
Anyone can suggest? Please advice me.
Thx.
David Weintraub wrote:
Well, it is sorting the files by name. Unfortunately, it is sorting them in
ASCII dictionary order.
The
Well, it is sorting the files by name. Unfortunately, it is sorting them in
ASCII dictionary order.
The easiest way (and maybe the only way) is to zero fill in the names of
these files when you create them, so that you have 001.sql and 010.sql
instead of 1.sql and 10.sql.
That way, they'll sort i
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 :
-