in reply to Re: ftp->put file error
in thread ftp->put file error
#test if ast file exists -e $astfile or die "Error: '$astfile' does not exist"; #open FTP session with remote server $ftp=Net::FTP->new($elutionsFTP, Timeout=>20, Debug=>0, Passive=>1) or $err=1; if($err){ logit("$error_time_stamp >Unable to connect to remote FTP serv +er $elutionsFTP\n$!"); die; } #login to to remote FTP server $ftp->login("$elutionsID", "$elutionsPWD") or $err=1; if($err){ logit("$error_time_stamp > Unable to login to remote FTP server $e +lutionsFTP as $elutionsID\n$!"); die; } #change directory on FTP server $ftp->cwd($putdir) or $err=1; if ($err) { logit("$error_time_stamp > Unable to change directory $putdir on $ +elutionsFTP server\n$!"); die; } $ftp->binary(); # set binary mode $ftp->put($astfile) or $err=1; if ($err) { logit("$error_time_stamp > Error transferring $astfile\n$!"); die ; } # Log successfull upload logit("\n\n$error_time_stamp > Transfer successfull: FTPserver: $eluti +onsFTP\n File: $astfile\n$!"); # End session $ftp->quit(); exit 0;
Log file output
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: ftp->put file error
by salatconed (Initiate) on Dec 02, 2010 at 15:12 UTC | |
by salatconed (Initiate) on Dec 02, 2010 at 15:21 UTC |