ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: How to copy absolute paths
Date Thu, 18 Mar 2004 11:16:15 GMT
Using Antcontribs <for> task.
Something like

<for param="file" list="${srcfiles}">
    <sequential>
        <copy file="@{file}" todir="${dest}"/>
    </sequential>
</for>


Jan

> -----Original Message-----
> From: Stefan Rufer [mailto:stefan.rufer@netcetera.ch]
> Sent: Thursday, March 18, 2004 12:14 PM
> To: user@ant.apache.org
> Subject: How to copy absolute paths
> 
> 
> Hi
> 
> I've troubles doing the most simple copy command having an 
> absolute path
> to a source file. Of course the example below can be coded in 
> a different
> way, but: We have a property-file that contains a property like
> 
> srcfiles=/tmp/a.file,/anotherplace/b.file
> 
> Therefore we would like to copy the files included in this 
> comma separated
> list to a destination directory.
> 
> Any hint why the following snipplet does not work appreciated.
> 
> 
> Thanks
> Stefan
> 
> 
> <?xml version="1.0" encoding="iso-8859-1"?>
> <project basedir="./" default="test" name="test">
>   <target name="test">
>     <mkdir dir="dest"/>
>     <copy todir="dest" flatten="true">
> 
>       <fileset dir="/" includes="/tmp/src.file"/>
> 
>       <!-- as soon as the includes filelist contains files starting
>            with root '/', the filelist seems to have no 
> effect any more
>            (tough ant shows the correct list of files in 
> debug mode). -->
>     </copy>
>   </target>
> </project>
> 
> --------------------------------------------------------------
> ----------
> Stefan Rufer                                   
> stefan.rufer@netcetera.ch
> Netcetera AG, 8040 Zuerich    phone +41 1 247 79 92  fax +41 
> 1 247 70 45
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message