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>  
  • 相关阅读:
    Evanyou Blog 彩带
    Evanyou Blog 彩带
    复合类型的声明——是int *p还是int* p
    指针
    引用
    变量声明和变量定义
    C++内置类型如何存放于计算机内存中
    C++的几种字符类型
    第四章 表达式
    ++i && i++
  • 原文地址:https://www.cnblogs.com/aligege/p/9076601.html
Copyright © 2011-2022 走看看