ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: looping in ant
Date Tue, 05 Feb 2002 00:12:52 GMT
I thought this would be an easy one, but it made me work and also find a bug
in <copy> (which will be patched shortly).

This *should* have worked, based on the documentation, but a flaw in the
logic for a one-file fileset causes it to lose the directory prefix and
issues an error (see the documentation on <copy> for the explanation of the
single-file fileset): [ Note: this solution only worked with post-1.4.1 Ant,
since the single-file fileset trick was added after the release ]
    <copy tofile="">
       <fileset dir="copy"/>

This should work for you though, even in v1.4.1 (although I only tried it
with my 1.5alpha build):
     <copy tofile="">
       <fileset dir="copy"/>
       <mapper type="glob" from="*" to=""/>


----- Original Message -----
From: "Shvartsburd, Feliks" <>
To: "'Ant Users List'" <>
Sent: Monday, February 04, 2002 2:16 PM
Subject: RE: looping in ant

> I need to do the following thing:
> 1. Copy .zip file to target directory and change its name in target
> location.
> Problem is that file name that I need to copy is not static. It changes
> appending timestamp to it. All I know that there is only one single .zip
> file in that location. Does anyone have an idea how to do that?
> Thanks
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message