On Mon, Aug 10, 2009 at 08:51, Redondo Gallardo, Raul
Maria<rmredo...@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
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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

Reply via email to