ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remo Liechti" <remo.liec...@swisslog.com>
Subject RE: Substring
Date Wed, 02 Nov 2005 08:48:06 GMT
Hi Roland

Thanks for this. I need to remove this slash cause my boss told me so.
Because it looks ugly...

The pathconvert works fine, thank you!

Remo 

> -----Original Message-----
> From: Roland Asmann [mailto:Roland.Asmann@cfc.at] 
> Sent: Mittwoch, 2. November 2005 09:47
> To: user@ant.apache.org
> Subject: RE: Substring
> 
> Hi Remo,
> 
> Why do you want to remove the slash anyway? Any doesn't mind, 
> and your paths will be reachable anyway... Sure, it doesn't 
> look nice in the putput, but it works....
> And, if it is a path, maybe you could try using 'pathconvert'.
> 
> <pathconvert property="combinedPath">
> 	<path location="${Prop1}${Prop2}" />
> </pathconvert>
> 
> And then you can use the property 'combinedPath' which has 
> done this substring-ing for you... It will even convert *NIX 
> paths to Windows and vice versa (maybe you need some mappings 
> for that if your NOT using relative paths, check the 
> pathconvert-help on ant.apache.org/manual)
> 
> Roland
> 
> 
> On Wednesday 02 November 2005 09:37, Remo Liechti wrote:
> > Hi Gil
> > Is there no easy way to do it? :/ It's a bit overhead to 
> write files 
> > for this, isn't it ;) If there is no other possibility I'll 
> do it this 
> > way...
> >
> > Thanks anyway,
> > Remo
> >
> > > -----Original Message-----
> > > From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> > > Sent: Mittwoch, 2. November 2005 09:31
> > > To: Ant Users List
> > > Subject: RE: Substring
> > >
> > >
> > > Hi,
> > >
> > > echo ${Prop1}${Prop2} to yourfile.txt then use a filterchain when 
> > > loading the contents of that file in a new property =
> > >
> > > <loadfile property="bla" srcfile="C:/yourfile.txt">
> > >             <filterchain>
> > >                 <replacestring from="//" to="/" />
> > >             </filterchain>
> > >         </loadfile>
> > >
> > >
> > >
> > > <echo>${bla}</echo>
> > >
> > > gives you >>> /my/folder/my other folder/
> > >
> > > Gilbert
> > >
> > >
> > > -----Original Message-----
> > > From: Remo Liechti [mailto:remo.liechti@swisslog.com]
> > > Sent: Wednesday, November 02, 2005 8:46 AM
> > > To: Ant Users List
> > > Subject: Substring
> > >
> > > Good Morning
> > > Is it possible to to some string operations on a property?
> > >
> > > Example:
> > > Prop1: "/my/folder/"
> > > Prop2: "/my other folder/"
> > >
> > > Now I log:
> > > File moved to: ${Prop1}${Prop2}
> > >
> > > This logs:
> > > "/my/folder//my other folder/"
> > >
> > > The double slash is not nice... But I need all the slashes in
> > > Prop1 and Prop2... So I need to do a substring action on 
> one of the 
> > > properties.
> > > I took a look at the documentation of ANT but did not found some 
> > > string operations or stuff like this. I think there is 
> such things, 
> > > may be I looked at the wrong place. If so, please tell me where I 
> > > have to look next time ;)
> > >
> > > Thank you
> > >
> > > Remo
> > >
> > > ____________________________________________________________
> > >
> > > 
> --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> > > additional commands, e-mail: user-help@ant.apache.org
> > >
> > >
> > > ____________________________________________________________
> > > This message has been checked for all known viruses by 
> Messagelabs.
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ____________________________________________________________
> This message has been checked for all known viruses by Messagelabs.
> 

____________________________________________________________
This message may contain legally privileged or confidential 
information and is therefore addressed to the named persons only. 
The recipient should inform the sender and delete this message, 
if he/she is not named as addressee. 
The sender disclaims any and all liability for the integrity 
and punctuality of this message. 
The sender has activated an automatic virus scanning by 
Messagelabs, but does not guarantee the virus free 
transmission of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message