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:17:28 GMT
Oops :

has to be

<echo>Filename === @{file}</echo>

the <for> task uses macrodef under the hood
therefore you have to use the syntax with @{...}


Gilbert Rebhan wrote:
> 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
> 
> 


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


Mime
View raw message