FAQ
Hi All,

I am using following code to transfer a file from remote host to local
system.

sub transferEJSFiles{

$ftp = Net::FTP->new($sourceServer, Timeout => 30) or die "Can't
contact $sourceServer: $!";

$ftp->login($sourceUser,$sourcePassword) or die "Can't login
($sourceUser):", $ftp->message;


$ftp->cwd("/home/clients/pvcs/adk/Installables/$ejsVersion/ejs/solaris/") or
die "Cannot change working directory ", $ftp->message;

$ftp->binary() or die "Cannot Convert to Binary Mode ",
$ftp->message;

$ftp->get("setup","$ejsTargetRoot/$ejsVersion/ejs/solaris/setup") or
die "get failed for setup", $ftp->message;

$ftp->cdup() or die "Can't moveup to parent directory : ",
$ftp->message;


$ftp->get("archive.dat","$ejsTargetRoot/$ejsVersion/ejs/archive.dat") or die
"get failed for archive", $ftp->message;

$ftp->quit;
}

Could some suggest how can i transfer a file from one remote host to another
remote host using FTP module. Is there any way of doing this . Please guide
me

Regards
Anand

Search Discussions

  • Kelvin Wu at Jul 21, 2004 at 1:40 am
    try $from_ftp->pasv_xfer($file, $to_ftp);
    perldoc Net::FTP for details.

    On Tue, 20 Jul 2004 09:09:49 -0400, anand.v@gxs.com wrote:
    Could some suggest how can i transfer a file from one remote host to another
    remote host using FTP module. Is there any way of doing this . Please guide
    me

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedJul 20, '04 at 1:19p
activeJul 21, '04 at 1:40a
posts2
users2
websiteperl.org

2 users in discussion

Anand V: 1 post Kelvin Wu: 1 post

People

Translate

site design / logo © 2022 Grokbase