B
banzai
Need help with the following automated ftp script please;
if (defined ($ftp1)) {
$ftp1->login($FTP1user,$FTP1password) or LogError("FTP login to
$FTP1server failed");
if (defined $FTP1destination){
$ftp1->cwd($FTP1destination) or LogError("Could not change directory
to $FTP1destination on $FTP1server");
}
$ftp1->binary;
$ftp1->put("$FileBodyName.tar.gz") or LogError("Could not FTP copy
$FileBodyName.tar.gz to $FTP1server");
$ftp1->put("$DataTagName.gz") or LogError("Could not FTP copy
$DataTagName.gz to $FTP1server");
$ftp1->quit;
} else {
LogError("FTP open failed to $FTP1server, error code: $!");
}
#
I need to modify the above so that the ftp transfers (put's) are attempted
up to 5 times in case the remote server does not respond. No time delay
needed between retries.
TIA
if (defined ($ftp1)) {
$ftp1->login($FTP1user,$FTP1password) or LogError("FTP login to
$FTP1server failed");
if (defined $FTP1destination){
$ftp1->cwd($FTP1destination) or LogError("Could not change directory
to $FTP1destination on $FTP1server");
}
$ftp1->binary;
$ftp1->put("$FileBodyName.tar.gz") or LogError("Could not FTP copy
$FileBodyName.tar.gz to $FTP1server");
$ftp1->put("$DataTagName.gz") or LogError("Could not FTP copy
$DataTagName.gz to $FTP1server");
$ftp1->quit;
} else {
LogError("FTP open failed to $FTP1server, error code: $!");
}
#
I need to modify the above so that the ftp transfers (put's) are attempted
up to 5 times in case the remote server does not respond. No time delay
needed between retries.
TIA