Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

How to get the last folder name?

Peter Nabbefeld

2010-09-03

Replies: Find Java Web Hosting

Author LoginPost Reply

Hello!

I want to get the path to the last child folder in some parent
directory. Tried this:

     <path id="_lastname">
        <last>
          <sort>
             <fileset dir="C:\my\parent"/>
          </sort>
        </last>
     </path>
     <property name="_lastname2" location="${_lastname}"/>
     <echoproperties/>

Doesn't work :-(

I'd also like to get the last one of a collection of folders, e.g.
C:\my\parent\xyz*

It seems, there're so many filters and tasks, I'd guess it should be
possible somehow - any good solution?

Thank You in advance

P.N.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.