ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Soesemann" <rsoesem...@sapient.com>
Subject foreach with relative path
Date Fri, 26 Nov 2004 17:16:26 GMT
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


Mime
View raw message