There is a solution based on an external Tasksuite called Ant Flaka . Using Ant Flaka, you get access to the main files and their properties (name, time, size ..) from your set of files. no need to open an external process with apply / cmd
<project name="demo" xmlns:fl="antlib:it.haefelinger.flaka">
<fl:install-property-handler />
<path id="foobar">
<fileset dir="/home/gilreb/Downloads">
<include name="*.zip"/>
</fileset>
</path>
<pathconvert property="zipfiles" refid="foobar"/>
<fl:for var="f" in="split('${zipfiles}', ':')">
<echo>
#{ format('filename %s, last modified %tD, size %s bytes', f.tofile.toabs,f.tofile.mtime,f.tofile.size) }
</echo>
</fl:for>
</project>
output =
...
[echo] filename /some/path/apache-ant-1.8.2-bin.zip, last modified 03/16/11, size 10920710 bytes
[echo]
[echo] filename /some/path/apache-ant-1.8.2-src.zip, last modified 03/16/11, size 8803388 bytes
[echo]
[echo] filename /some/path/apache-ant-antunit-1.1-bin.zip, last modified 04/17/11, size 70477 bytes
...