Ant: How to select the latest modified file from a directory?
You can do that with the TimestampSelector
task from ant-contrib.
<timestampselector property="latest.modified">
<path>
<fileset dir="${my-directory.dir}">
<include name="file-*" />
</fileset>
</path>
</timestampselector>
<echo message="${latest.modified}" />