HI u can try like that
 <target name="checkForExist">
        <available file="${dir}/file.txt" property="fileExist"/>
    </target>
 <target name="invokeTargetIfExist" depends="checkForExist"
if="checkForExist">
        Exec file.bat
</target>

hope will helpfull for u

Sushim

On Tue, Aug 4, 2009 at 3:07 PM, Redondo Gallardo, Raul Maria <
rmredo...@eservicios.indra.es> wrote:

>  Hello,
>
>
>
> I’m trying to do with ANT anything like:
>
>
>
>             If exist a file (file.txt)
>
>                         Exec file.bat
>
>             End if
>
>
>
> But I don’t get it. Is it possible to do this with ANT?
>
>
>
> Thank you very much.
>
>
>
> Best regards,
>
>
>
> *Raúl María Redondo Gallardo*
>
> * Dpto. transporte y Tráfico*
>
> * <http://www.indra.es/>*
>
> **
>
> *C/ Mar Egeo, 4*
>
> *Pol. Ind. San Fernando*
>
> *San Fernando de Henares*
>
> *28830 - Madrid (ESPAÑA)
> Tel:  +34-91-626.92.21*
>
> *Fax: +34-91.626.88.68*
>
> rmredo...@eservicios.indra.es
>
> *www.indra.es*
>
>
>



-- 
Sushim Saini
09920547761

Reply via email to