ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Redondo Gallardo, Raul Maria" <rmredo...@eservicios.indra.es>
Subject RE: Check if exist a file and then run or not a target
Date Tue, 04 Aug 2009 10:00:43 GMT
Thank you very much,

I'll try it now, this seems be a good form to do this.

Thank you very much.

Best regards

-----Mensaje original-----
De: Sushim Saini [mailto:sushimsaini@gmail.com] 
Enviado el: martes, 04 de agosto de 2009 11:46
Para: Ant Users List
Asunto: Re: Check if exist a file and then run or not a target

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 <
rmredondo@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*
>
> rmredondo@eservicios.indra.es
>
> *www.indra.es*
>
>
>



-- 
Sushim Saini
09920547761

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


Mime
View raw message