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 10:25:18 GMT
ya my mistake it should be like
if="fileExist", not if="checkForExist"

Thanks to correct me



On Tue, Aug 4, 2009 at 3:45 PM, Michael George <mdgeorge@cs.cornell.edu>wrote:

> 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
>
>


-- 
Sushim Saini
09920547761

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