Hi Anand,

I fear that you will have to run our perl-script or any other ftp-script
remote on one of your servers, if you are bound to the ftp-protocol.
The only alternative is to copy it first to your desktop and then to the
second server.
Sorry but ftp is a protocol between two points.

Mit freundlichen Gruessen / Best regards

Manfred Beilfuss




                                                                                       
                          
                    [EMAIL PROTECTED]                                                  
                              
                    om                   An:     [EMAIL PROTECTED]                     
                         
                                         Kopie:                                        
                          
                    20.07.2004           Thema:  FTPing of files between remote 
servers.                         
                    15:09                                                              
                          
                                                                                       
                          
                                                                                       
                          




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






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to