--- Brian DeWeese <[EMAIL PROTECTED]> wrote:
> What would be the best way to get just the filename from a property
> whose value is a fully qualified path?
>
> Such as get "foo.txt" from "d:\dir1\dir2\foo.txt".
<property name="foodir" location="d:/dir1/dir2"/>
<target name="doFilename">
<pathconvert pathsep="${file.separator}" property="filename">
<path>
<pathelement location="${foodir}/foo.txt"/>
</path>
<map from="${foodir}${file.separator}" to=""/>
</pathconvert>
<echo message="filename = ${filename}"/>
</target>
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>