You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Rufer <st...@netcetera.ch> on 2004/03/18 12:13:39 UTC

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