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 <mdgeo...@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:sushimsa...@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-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > -- Sushim Saini 09920547761