You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefano Mancarella <ma...@opoipi.bancaintesa.it> on 2002/04/24 14:01:00 UTC

Extracting path from file name

I have a property containing the full path to a file and I want extract the
directory path only.

For example, from:

<property name="some.property" value="/somedir/somefile"/>

I want to get "/somedir" only.

How can I do this (using Ant 1.4.1 and, possibly, not with a script)?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extracting path from file name

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 24 Apr 2002, Stefano Mancarella
<ma...@opoipi.bancaintesa.it> wrote:

> How can I do this (using Ant 1.4.1 and, possibly, not with a
> script)?

Pick up the new dirname task from Ant's CVS.  Don't use the latest
revision but Diane's initial version, this should work with 1.4.1 as
well.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>