他のサイトに載っていたものを編集したbuild.xml完全版です。
フォルダ構成ごとコピーできるから便利。
http://www.xucker.jpn.org/java/ant/example/sabun.html
ここから build.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<project name="project" default="copynew" basedir=".">
<property name="src.dir" value="." />
<target name="copynew">
<loadfile property="loadTime" srcfile="time.txt" failonerror="false"/>
<condition property="loadTime" value="01/01/1978 00:00 AM">
<not>
<available file="time.txt"/>
</not>
</condition>
<echo message="last ${loadTime}"/>
<mkdir dir="new"/>
<copy todir="new" failonerror="false" includeEmptyDirs="false">
<fileset dir="${src.dir}"
includes="**/*.class,**/*config*.xml,**/*.properties">
<date when="after" datetime="${loadTime}"/>
</fileset>
</copy>
<antcall target="last"/>
</target>
<target name="last" description="日付を書き出すのみ">
<tstamp>
<format property="last" pattern="MM/dd/yyyy hh:mm aa" locale="en"/>
</tstamp>
<echo message="${last}" file="time.txt"/>
</target>
</project>