<target name="copyFileAndDir" description="拷贝文件和目录">
<!-- 拷贝单个文件 -->
<copy file="error.log" tofile="debug.log"/>
<!-- 拷贝单个文件到指定目录 -->
<copy file="error.log" todir="${LOG.DIR}"/> <!-- 拷贝多个文件到指定目录 -->
<copy todir="${LOG.DIR}">
<fileset dir="log">
<include name="**/*.log"/>
<exclude name="**/error.log"/>
</fileset>
</copy>
<!-- 同上 -->
<!--
<copy todir="${LOG.DIR}">
<fileset dir="log" excludes="**/*.txt"/>
</copy>
--> <!-- 拷贝一个目录到另一个目录 -->
<copy todir="newbin">
<fileset dir="bin"/>
</copy>
</target>
包含在这段里了 排除就是exclude
<!-- 拷贝单个文件 -->
<copy file="error.log" tofile="debug.log"/>
<!-- 拷贝单个文件到指定目录 -->
<copy file="error.log" todir="${LOG.DIR}"/> <!-- 拷贝多个文件到指定目录 -->
<copy todir="${LOG.DIR}">
<fileset dir="log">
<include name="**/*.log"/>
<exclude name="**/error.log"/>
</fileset>
</copy>
<!-- 同上 -->
<!--
<copy todir="${LOG.DIR}">
<fileset dir="log" excludes="**/*.txt"/>
</copy>
--> <!-- 拷贝一个目录到另一个目录 -->
<copy todir="newbin">
<fileset dir="bin"/>
</copy>
</target>
包含在这段里了 排除就是exclude
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货