On 28 Aug 2013, at 21:13, Edheldil <fg001@eowyn.cz> wrote:

Can't you use rsync instead of scp? It can upload to a temporary directory and move the files when they are successfully transfered, and uses temporary files anyway. I believe it also deletes the temporaries if the transfer is interrupted.

No, rsync is not available as a direct Jenkins plugin (we could run it manually of course from a command-line step, but that becomes more work to deploy across different slaves). However I've found a different SFTP plugin (does SSH as well as SCP) which can execute remote commands after copying artefacts - which should do the job nicely. Just testing that out now!