公告
财富商城
积分规则
提问
发文
2019-06-15 01:23发布
smile是对你的礼貌
How to rename file while copying it to directory in ant?
<copy file="..." todir="..." overwrite="true">
It should be as simple as
<copy file="mySourceFile" tofile="MyDestFile" />
Use tofile option instead of todir
tofile
todir
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>
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>
最多设置5个标签!
It should be as simple as
Use
tofile
option instead oftodir
Added
Or a more complex example from Ant Copy Task documentation: