ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Loop over a set of files
Date Tue, 10 Oct 2006 15:27:09 GMT
An example loop over files:

<project default="test" xmlns:ac="antlib:net.sf.antcontrib">
  <macrodef name="processfile">
    <attribute name="file"/>
    <sequential>
      <echo>Process @{file}</echo>
    </sequential>
  </macrodef>

  <target name="test">
    <ac:for param="file">
      <fileset dir="." includes="**/*.xml"/>
      <sequential>
        <processfile file="@{file}"/>
      </sequential>
    </ac:for>
  </target>
</project>

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message