zoukankan      html  css  js  c++  java
  • Ant复制文件

     1 <?xml version="1.0" encoding="UTF-8"?>  
     2 <project name ="test" default="copy" basedir=".">  
     3 <target name ="copy">  
     4 <!--拷贝一个文件 -->  
     5 <copy file ="myfile.txt" tofile="mycopy.txt"/>  
     6   
     7 <!--拷贝一个文件到指定目录 -->  
     8 <copy file ="myfile.txt" todir="other"/>  
     9   
    10 <!-- 拷贝一个目录到另一个目录 -->  
    11 <copy todir="other">  
    12 <fileset dir="bin"/>  
    13 </copy>  
    14   
    15 <!-- 拷贝一个文件集到另一个目录 -->  
    16 <copy todir="other">  
    17 <fileset dir="bin">  
    18 <!--  排除所有的.java文件 -->  
    19 <exclude name="**/*.java"/>  
    20 </fileset>  
    21 </copy>  
    22   
    23 <!-- 拷贝一个文件集到另一个目录,同时建立备份文件-->  
    24 <copy todir="other">  
    25 <fileset dir="bin" />  
    26 <globmapper from="*" to="*.bak"/>  
    27 </copy>  
    28   
    29 <!-- 使用copydir拷贝一个目录下的东西到另一个目录,includes包含,excludes排除(已过时) -->  
    30 <copydir src="bin"   
    31 dest="other"  
    32 includes="**/*.java"  
    33 excludes="**/Test.java"  
    34 />  
    35   
    36 <!-- 使用copyfile拷贝一个文件(已过时)-->  
    37 <copyfile src ="test.java" dest="other/test.java"/>  
    38 </target>  
    39 </project>  
  • 相关阅读:
    数字精确运算BigDecimal经常用法
    C3P0数据库连接池使用
    Theano学习笔记(四)——导数
    Leetcode--Merge Intervals
    1191 数轴染色
    P1021 邮票面值设计
    P1032 字串变换
    P1294 高手去散步
    P1832 A+B Problem(再升级)
    P1332 血色先锋队
  • 原文地址:https://www.cnblogs.com/aligege/p/9076601.html
Copyright © 2011-2022 走看看