ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael George <mdgeo...@cs.cornell.edu>
Subject Re: Check if exist a file and then run or not a target
Date Tue, 04 Aug 2009 10:15:06 GMT
Redondo Gallardo, Raul Maria wrote:
> 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>
>   
I think you want: if="fileExist", not if="checkForExist"

--Mike

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


Mime
View raw message