<dirname property="pdir" file="build.xml" /> <basename property="dirname" file="${pdir}"/> Peter
On Mon, Mar 31, 2008 at 8:51 PM, mindspin311 <[EMAIL PROTECTED]> 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: > http://www.nabble.com/Need-to-find-current-directory-%28not-entire-path%29-tp16399048p16399048.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]