--- "Md. Jahidul Hasan" <[EMAIL PROTECTED]>
wrote:
> Is there any task to find the drive name from a
> given file/directory path
> ? "dirname" task can't help in this regards as it
> takes the full path
> until that filename. I only need that drive name.
Ant 1.7.0, untested:
<property name="normalizedPath"
location="${givenPath}" />
<pathconvert>
<first>
<tokens>
<string value="${normalizedPath}" />
<stringtokenizer delims="${file.separator}" />
</tokens>
</first>
</pathconvert>
If by chance you want to work with svn trunk, it is
compatible with the experimental props antlib that
intends to provide this functionality inside a
property expression.
HTH,
Matt
>
> Thanks
> Hasan
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total
Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]