How do I use the <IF> task to check for the existence of a file where the file name is stored in a property?

 

The documentation shows

<if test=”${not file::exists(‘output.xlm’)}”>

  ...

</if>

 

but trying to do the following does not seem to work.

<property name=’file.to.check’ value=’output.xml’>

<if test=”${not file::exists(‘${file.to.check}’)}”>

</if>

 

It appears that the ${file.to.check} is not expanded but taken literally

 

Any ideas?

 

Joe Uchytil

 

Reply via email to