You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jason Novotny <no...@aei.mpg.de> on 2005/09/08 13:10:23 UTC
how to copy only if dest file does not exist
Hi,
I want to copy a file from source to dest ONLY if the dest file does
not exist. It seems the overwrite attribute is not quite appropriate in
this case since it's possible for the source file to be newer. But even
if it is newer I don't want it being copied over as long as the dest
file is present.
Thanks, Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: how to copy only if dest file does not exist
Posted by Andrew Goktepe <an...@gmail.com>.
You could use the <available> task to determine whether or not the file
already exists.
http://ant.apache.org/manual/CoreTasks/available.html
-Andrew
On 9/8/05, Jason Novotny <no...@aei.mpg.de> wrote:
>
>
> Hi,
>
> I want to copy a file from source to dest ONLY if the dest file does
> not exist. It seems the overwrite attribute is not quite appropriate in
> this case since it's possible for the source file to be newer. But even
> if it is newer I don't want it being copied over as long as the dest
> file is present.
>
> Thanks, Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Are there ANT tasks for SFTP?
Posted by js...@internetinformatics.net.
Hello ANT users,
I'm building a ANT deploy script that needs to use SFTP. I
see FTP and SshExec in the optional tasks, but nothing on
SFTP.
Does anyone know if an sftp task has been attempted or
requested?
Thanks,
James Stallard
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: how to copy only if dest file does not exist
Posted by Matt Benson <gu...@yahoo.com>.
--- Jason Novotny <no...@aei.mpg.de> wrote:
[SNIP]
> I want to copy a file from source to dest ONLY
> if the dest file does
> not exist.
Use the <present> selector.
-Matt
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org