复制文件重命名蚂蚁 [英] Ant renaming while copying file
本文介绍了复制文件重命名蚂蚁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
而在蚂蚁将其复制到目录如何重命名文件?
<拷贝文件=...todir =...覆盖=真>
解决方案
使用 TOFILE
选项,而不是 todir
添加
或从的Ant复制任务文档更复杂的例子:
一组文件复制到一个目录,附加.bak的对文件名
飞<副本todir =../备份/目录>
<文件集DIR =src_dir/>
<从=*为= globmapper /&GT* BAK。
< /复制>
块引用>How to rename file while copying it to directory in ant?
<copy file="..." todir="..." overwrite="true">
解决方案Use
tofile
option instead oftodir
Added
Or a more complex example from Ant Copy Task documentation:
Copy a set of files to a directory, appending .bak to the file name on the fly
<copy todir="../backup/dir"> <fileset dir="src_dir"/> <globmapper from="*" to="*.bak"/> </copy>
这篇关于复制文件重命名蚂蚁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文