ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis GALIEGUE <...@one2team.com>
Subject Re: Another options
Date Mon, 10 Aug 2009 09:08:23 GMT
On Mon, Aug 10, 2009 at 08:51, Redondo Gallardo, Raul
Maria<rmredondo@eservicios.indra.es> wrote:
> Good morning, ANT users,
>
>
>
> I need to check a folder structure and if in a folder found a certain file,
> do several things. Is the best way to do this to use a fileset or exist
> another better option?
>
> With the fileset…. I’m locked. :S:S
>

I'd use ant-contrib's <for> and if/then/else:

<for param="victim">
    <dirset>
        <!-- define dirset here -->
    </dirset>
    <sequential>
        <if>
            <available file="@{victim}/thefile" type="file"/>
            <then>
                <!-- your stuff -->
           </then>
        </if>
    </sequential>
</for>


-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Mime
View raw message