You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Knuplesch, Juergen" <Ju...@icongmbh.de> on 2008/11/26 16:00:21 UTC
AW: ****SPAM**** how to use ?
Who creates this dir?
Who knows the name?
The best way is to pass the information on to your antfile.
--
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: ndario [mailto:darionis@yahoo.com]
Gesendet: Mittwoch, 26. November 2008 15:54
An: user@ant.apache.org
Betreff: ****SPAM**** how to use <first>?
Hello,
I want to copy a set of files to a directory which is dynamically generated.
I know only a part of name of that directory, it looks like this "tmp*abc":
tmp24235abc
tmp76957abc
tmp556abc
tmp6344abc
I need to copy files to a directory which has latest creation date. I guess it would be possible with <sort> and <first> elements but I have no idea how to use it? This example
<copy todir="dest" flatten="true">
<first count="2">
<sort>
<date
xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
<resources>
<file file="src_dir/file1.txt"/>
<file file="src_dir/file2.txt"/>
<file file="src_dir/file3.txt"/>
<url url="http://ant.apache.org/index.html"/>
</resources>
</sort>
</first>
</copy>
finds latest file and copies it to the destination, but I want the oposite.
I need to determine correct destination.
Could anybody give me a hint how to use <first>, please.
Thanks
--
View this message in context: http://www.nabble.com/how-to-use-%3Cfirst%3E--tp20702429p20702429.html
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org