I have below script which will give me number of files mentioned in my "count" field. What I want is to get all the files that were modified today.
<project name="copy latest files test" basedir="." xmlns:sf="antlib:com.salesforce">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="C:/apache-ant-1.9.6/lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<!-- Create sub folder called classes -->
<target name="createClassesFolder">
<mkdir dir="tempFolder/classes"/>
</target>
<!-- Copy contents of classes folder from source folder -->
<target name="moveClassesFolder" depends="createClassesFolder">
<copy toDir="tempFolder/classes" preservelastmodified="true">
<last count="2">
<sort>
<date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
<resources>
<fileset dir="retrieveUnpackaged/classes"/>
</resources>
</sort>
</last>
</copy>
</target>
</project>
I also want to get .xml file of the same files that were copied during the process. The reason to get .xml file is to use ANT migration tool once I have everything in other directory. How do I achieve that? Any help would be greatly appreciated.
I found a solution to this. Below is the ANT script.