Check the existence file in ant

Viewed 39218

Possible Duplicate:
Ant task to check if a file exists?

How can one check if a file exist in a directory, if not use another file in different location. I tried the follow but does not help me with what I want. Could someone help?

 <condition property="somefile.available">
     <or>
         <available file="/home/doc/somefile"/>
         <and>
             <available file="/usr/local/somefile" />
         </and>
     </or>
 </condition>
2 Answers
Related