ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: Execute task for each file in a fileset?
Date Fri, 22 Sep 2006 19:13:18 GMT
Hi, Eric

use the antcontrib <for> task like that

<for param="file">
  <path>
    <fileset dir="${yourdirectory}"/>
  </path>
  <sequential>
    <!-- the real work goes here -->	
    <echo>Filename === @{file}
  </sequential>
</for>

> I'd like to execute a task or a target for each file in a fileset (ex: copy
> each file in a fileset to another location with another name). The _apply_
> task does this for system commands, but how can I do it for built-in tasks
> or tasks defined with PreSetDef? A "ForEach" task?

see antcontrib manual here =
http://ant-contrib.sourceforge.net/tasks/tasks/index.html


get antcontrib here =
http://sourceforge.net/project/showfiles.php?group_id=36177

Regards, Gilbert

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


Mime
View raw message