Just an idea and not tested. Use '=' for separating source from target name. 
Used AntContrib.

copy.txt
--------
/a/b/c.xml=/d/e/f.xml
...



<loadfile property="allfiles" file="copy.txt"/>
<ac:for list="${allfiles}" param="line">
    <sequential>
        <ac:propertyregex property="from" input="@{file}" regexp="(.*)=(.*)" 
select="\1" override="true"/>                   
        <ac:propertyregex property="to"   input="@{file}" regexp="(.*)=(.*)" 
select="\2" override="true"/>
        <copy file="${from}" tofile="${to}"/>
    </>
</>



Jan


>-----Ursprüngliche Nachricht-----
>Von: Mitja B. [mailto:[EMAIL PROTECTED] 
>Gesendet: Montag, 10. September 2007 10:32
>An: Materne, Jan (RZF)
>Betreff: Re: AW: Open and read file with ant and then copy
>
>We have few different customers which all have uniq files to 
>copy. We want
>that if is possible ant read project.txt file and in it are 
>all relative
>paths for files to copy, then ant will copy all this files.
>
>Is this possible?
>
>
>--------- Original Message --------
>From: [EMAIL PROTECTED]
>To: user@ant.apache.org <user@ant.apache.org>, [EMAIL PROTECTED]
><[EMAIL PROTECTED]>
>Subject: AW: Open and read file with ant and then copy
>Date: 10/09/07 09:49
>
>> What is the use case for using this project.txt?
>> 
>> Usually you copy a bunch of files with &lt;copy todir&gt;&lt;fileset
>dir=&quot;from&quot;&gt;
>> 
>> 
>> Jan 
>> 
>> &gt;-----Ursprüngliche Nachricht-----
>> &gt;Von: Mitja B. [mailto:[EMAIL PROTECTED] 
>> &gt;Gesendet: Montag, 10. September 2007 09:29
>> &gt;An: user@ant.apache.org
>> &gt;Betreff: Open and read file with ant and then copy
>> &gt;
>> &gt;I have big problem. I search but can not find and solution.
>> &gt;
>> &gt;We want to open some file, for example project.txt
>> &gt;
>> &gt;in it we will have content like this
>> &gt;
>> &gt;instmmconnection.xml projrtuconnection.xml
>> &gt;
>> &gt;we want now that ant read this file and copy connectiion.xml 
>> &gt;from instmm
>> &gt;directory to projrtu directory
>> &gt;
>> &gt;How can we do this with ant, or even better is this possible?
>> &gt;
>> &gt;Thx
>> &gt;
>> &gt;________________________________________________
>> &gt;Message sent using UebiMiau 2.7.10
>> &gt;
>> &gt;
>> &gt;
>> 
>&gt;-----------------------------------------------------------
>----------
>> &gt;To unsubscribe, e-mail: [EMAIL PROTECTED]
>> &gt;For additional commands, e-mail: [EMAIL PROTECTED]
>> &gt;
>> &gt;
>> 
>> 
>
>________________________________________________
>Message sent using UebiMiau 2.7.10
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to