<?xml version="1.0" ?> <project name="antCopy" default="target1" basedir="../"> <target name="target1"> <delete file="E:/workspace/AntDemo/ant/test/test02/1.txt" /> <delete dir="E:/workspace/AntDemo/ant/test/test03" /> <delete includeemptydirs="true"> <fileset dir="E:/workspace/AntDemo/ant/test/test02" excludes="*.bak"></fileset> </delete> </target> </project>
<!--
delete 命令
对文件或目录进行删除,举例如下:
eg1. 删除某个文件:
<delete file="/home/photos/philander.jpg"/>
eg2. 删除某个目录:
<delete dir="/home/photos"/>
eg3. 删除所有的备份目录或空目录:
<delete includeEmptyDirs="true">
<fileset dir="." includes="**/*.bak"/>
</delete>
<delete includeEmptyDirs="true">
<fileset dir="." excludes="**/*.bak"/>
</delete>
-->
时间: 2024-10-09 20:20:18