Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ant get任务-将文件另存为其给定名称_Ant - Fatal编程技术网

Ant get任务-将文件另存为其给定名称

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

我正在使用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 it in destLocation -->
<get src="${srcUrl}" dest="${destLocation}" />

....

<basename property="destLocation" file="${srcUrl}"/>