ant <copy文件忽略目录结构flatten="true"
2015-11-12 15:01
417 查看
把D:\automation\patch\Patch_TMDM_V5.6.1_20150304\下面的文件tem.ear
copy到D:\work里。
知道具体的src和dest直接用下面代码就行
有时候具体的文件夹名字不清楚,只知道父目录结果。
例如D:\automation\patch**\有文件tem.ear
如果上面那么写,连同tem.ear及它的父文件夹都会被copy到目的目录里。
如果只想copy文件,就得加上flatten=”true”。这个属性的作用就是忽略路径,只copy文件
copy到D:\work里。
知道具体的src和dest直接用下面代码就行
<copy todir="D:/work" file="D:/automation/patch/Patch_TMDM_V5.6.1_20150304/tem.ear"></copy>
有时候具体的文件夹名字不清楚,只知道父目录结果。
例如D:\automation\patch**\有文件tem.ear
<copy todir="D:/work"> <fileset dir="D:/automation/patch"> <include name="**/tem.ear"/> </fileset> </copy>
如果上面那么写,连同tem.ear及它的父文件夹都会被copy到目的目录里。
如果只想copy文件,就得加上flatten=”true”。这个属性的作用就是忽略路径,只copy文件
<copy todir="D:/work" flatten="true"> <fileset dir="D:/automation/patch"> <include name="**/tem.ear"/> </fileset> </copy>
相关文章推荐
- Django中request和response中的属性方法详述
- UIView 控件
- Mac下安装使用apktool,jd-gui进行反编译
- karma+requirejs+angular 测试
- Bluemix 动手系列 (二) 通过命令行部署和更新云应用
- java web 通过前台输入的数据(name-value)保存到后台 xml文件中
- uiscrollview和uiimagevie的代理实现
- iOS中UIPickerView详解
- UIView的层次结构--code
- IOS中UIView的响应事件,属性和方法
- 自定义uitableviewcell
- 《锋利的jQruery》读书笔记
- 【笔记】媒体查询Media Querier
- easyui combobox
- BIOS设置之UEFI/Legacy BIOS切换图文详解
- Java中String和StringBuffer,StringBuilder的区别小结
- UIScrollView配合定时器自动循环滚动
- requestWindowFeature使用详解
- UITextField addTarget (实时监听,动态获取UITextFieldtext的值变化)
- [LeetCode] Range Sum Query 2D - Immutable 二维区域和检索 - 不可变