yeah, I tried it like below. It gave me the directory name but only the
first directory. The value does not change for all the subsequent
directories. Do you have any ideas?
<sequential>
<basename property="dirName" file="@{soa.project.dir}"/>
<echo>@{soa.project.dir} : ${dirName}</echo>
</sequential>
David Weintraub wrote:
>
> Have you tried the <basename> task?
>
> On Fri, Jun 25, 2010 at 6:29 PM, Andy2008 <[email protected]> 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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
> --
> David Weintraub
> [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/How-to-retrieve-directory-name-tp28997168p28997375.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]