Just use <copy>.

<copy file tofile/> will fail if the requested file does not exist.
<copy todir><fileset dir includes="the-requested-file/></copy> wont ...


Jan 

>-----Ursprüngliche Nachricht-----
>Von: eric.w...@thomsonreuters.com 
>[mailto:eric.w...@thomsonreuters.com] 
>Gesendet: Donnerstag, 29. Juli 2010 23:09
>An: user@ant.apache.org
>Betreff: Ant: want to copy a file if it exists
>
>I want to check to see if a file exist and if so then copy it.  What is
>the best way for performing this conditional task?
>
> 
>
>Thanks, eric
>
>

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

Reply via email to