[prev in list] [next in list] [prev in thread] [next in thread]
List: ant-user
Subject: foreach with relative path
From: "Robert Soesemann" <rsoesemann () sapient ! com>
Date: 2004-11-26 17:16:26
Message-ID: D8592BFB6BB4CA43B70558B8ECB6C1851BEEB9 () munsmsx01 ! sapient ! com
[Download RAW message or body]
My problem lies in the following snippet:
...
<target name="8_main">
<foreach target="8_iterator" param="file-path" >
<path>
<fileset dir="xmls" includes="**/*.xml"/>
</path>
</foreach>
</target>
<target name="8_iterator" >
<echo message="${file-path}"/>
</target>
...
The output of the echo/$file-path variable are absolute paths like:
C:\program\....\xmls\foo1.xml
C:\program\....\xmls\bar\foo2.xml
To further process files I need to get relative paths like:
\foo1.xml
\bar\foo2.xml
How can I get this? Any idea?
Thanks in advance.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic