Ant get任务-将文件另存为其给定名称
我正在使用Ant的“获取”任务将文件保存到磁盘。我不太熟悉Ant,也不知道如何从源url中删除文件名以用作文件的目标 例如:Ant get任务-将文件另存为其给定名称,ant,Ant,我正在使用Ant的“获取”任务将文件保存到磁盘。我不太熟悉Ant,也不知道如何从源url中删除文件名以用作文件的目标 例如: <property name="srcUrl" value="http://localhost/foo/bar.html" /> <property name="destLocation" value="" /> .... <!-- now, dynamically grab "bar.html" from srcUrl and store
<property name="srcUrl" value="http://localhost/foo/bar.html" />
<property name="destLocation" value="" />
....
<!-- now, dynamically grab "bar.html" from srcUrl and store it in destLocation -->
<get src="${srcUrl}" dest="${destLocation}" />
....
<basename property="destLocation" file="${srcUrl}"/>