P
Pascal
Hi All,
I get an issue by using Net::FTP to transfer both text and binary files from
an Unix server to a PC under Windows 2000. For that, I'm using the
Net::FTP::Get() function.
The files are transferred to the PC but some characters 'OD' are added into
the binary files. However, I've well activated the binary mode by
Net::FTP::Binary().
Below is an extract of my code:
my $opt_s = "myserver";
my $opt_u = "mylogin";
my $opt_p = "mypassword";
my $opt_r = "myremotedir";
$ftp = new Net::FTP ( $opt_s );
die "Failed to connect to server '$opt_s': $!\n" unless $ftp;
die "Failed to login as $opt_u\n" unless $ftp->login($opt_u, $opt_p);
warn "Failed to set binary mode\n" unless $ftp->binary();
print "Cannot change directory to $opt_r\n" unless $ftp->cwd($opt_r);
die "Failed to GET $l\n" unless $ftp->get("file.bin",
"$localdir/file.bin");
$ftp->quit if( defined($ftp) );
I don't get idea about how I can solve my problem. Could you help me ? Is
this problem a know bug from Net::FTP ?
Thanks very much for your help.
BRgds
Pascal
I get an issue by using Net::FTP to transfer both text and binary files from
an Unix server to a PC under Windows 2000. For that, I'm using the
Net::FTP::Get() function.
The files are transferred to the PC but some characters 'OD' are added into
the binary files. However, I've well activated the binary mode by
Net::FTP::Binary().
Below is an extract of my code:
my $opt_s = "myserver";
my $opt_u = "mylogin";
my $opt_p = "mypassword";
my $opt_r = "myremotedir";
$ftp = new Net::FTP ( $opt_s );
die "Failed to connect to server '$opt_s': $!\n" unless $ftp;
die "Failed to login as $opt_u\n" unless $ftp->login($opt_u, $opt_p);
warn "Failed to set binary mode\n" unless $ftp->binary();
print "Cannot change directory to $opt_r\n" unless $ftp->cwd($opt_r);
die "Failed to GET $l\n" unless $ftp->get("file.bin",
"$localdir/file.bin");
$ftp->quit if( defined($ftp) );
I don't get idea about how I can solve my problem. Could you help me ? Is
this problem a know bug from Net::FTP ?
Thanks very much for your help.
BRgds
Pascal