ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mindspin311 <>
Subject Re: Need to find current directory (not entire path)
Date Mon, 31 Mar 2008 21:32:41 GMT

Wow, completely overlooked basename, but that only really solves this
specific problem. I was really hoping to find out if there was a way to
parse a string or property. Let's say I'm using svn update and it returns
'At revision 100'. I put that string into a property. 

Now, how do I extract just the 100?

Is there any built in functionality that will solve this, or do I have to
make my own task to handle something like this?

mindspin311 wrote:
> If I have the following path: /blah/foo/trunk/ 
> I want to be able to assign just "trunk" to a property, similar to
> dirname:
>   <dirname property="pdir" file="build.xml" />
> This returns the whole path. I just want it to return the last element of
> a directory.

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message