Have you tried the <basename> task? On Fri, Jun 25, 2010 at 6:29 PM, Andy2008 <hoangt...@yahoo.com> wrote: > > I'm looping thru a directory that contains a lot of sub directories. I want > to get the name of each sub directory. Below is my code > > <for param="soa.project.dir"> > <path> > <dirset dir="${svn.src.dir}"> > <present targetdir="${svn.src.dir}"> > <mapper type="glob" from="*" to="*/${bpel.composite}" /> > </present> > </dirset> > </path> > <sequential> > <echo>@{soa.project.dir}</echo> > </sequential> > </for> > > Right now it outputs the whole path such as "c:\abc\def" which is good > since I need the path but I also need the name of the subfolder too which is > "def". The path of the folder is not fixed as in my example. It could be a > long one too such as c:\aaa\bbb\ccc\ddd\eee\fff\def > > Do you have any ideas how to get the name? > > Thanks > -- > View this message in context: > http://old.nabble.com/How-to-retrieve-directory-name-tp28997168p28997168.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > >
-- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org