ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <>
Subject r_e_m_o_v_e a string within a path
Date Tue, 01 Jul 2003 16:20:05 GMT
Hi !

I'm trying to remove a source directory from a path (in a property). I
don't want to use ReplaceRegExp for now but I think that would be the
same pb anyway (not looking at a <script> solution either).

I tried the following:

   <property name="" value="" />
   <propertyfile file="${}">
       <entry key="tmp.package" value="${xml.source.dir}"/>
   <replace file="${}" token="${source.dir}" value="" />
   <property file="${}" />
   <echo>package name = ${tmp.package}</echo>

I however get no transformation.

when I echo ${source.dir} and ${xml.source.dir} I get the following:

[echo] removing C:\Data\1671sc\src\dao/main from

also after the <property call> I get (WIN32):

in the file.

do I need to make a first pass to escape all '/' and '\' in
${source.dir} or this there an easiest to remove a string from a path in

a portable way ?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message