ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sushim Saini <sushimsa...@gmail.com>
Subject Re: Check if exist a file and then run or not a target
Date Tue, 04 Aug 2009 09:46:09 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message