laziness, impatience, and hubris | |
PerlMonks |
Re: Delete files from server after downloading using SFTPby hbm (Hermit) |
on Jun 11, 2013 at 21:15 UTC ( [id://1038341]=note: print w/replies, xml ) | Need Help?? |
I recommend sleep-and-retry, for that inevitable transmission problem:
Actually, I tend to pass a hash of configuration details (hostname, username, retries, sleep time, etc.) and do this:
I do a similar sleep and retry for any get and put, but also compare remote and local file sizes:
When removing files, I do so IF the respective put or get is successful. Something like:
In Section
Seekers of Perl Wisdom
|
|