

Ant Task サンプル 前回との、最新ファイルのみコピーします。
実行するたびに、前回との差分のファイルをコピーします。
納品用に使っております。
<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="${targetDir}"> <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>

