ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
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">
    <fileset dir="${yourdirectory}"/>
    <!-- the real work goes here -->	
    <echo>Filename === @{file}

> 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 =

get antcontrib here =

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message