Re: [Ssh-sftp-perl-users] Net::SFTP::Foreign; results
Brought to you by:
dbrobins
From: Arifuddin, A. <Ari...@xe...> - 2009-11-03 18:27:51
|
Thanks, What works in this case i just put the directory name for both from and to without wild-carding... regards, Ari...@Xe... -----Original Message----- From: Vikas Poonia [mailto:vik...@ya...] Sent: Tue 11/3/2009 1:25 AM To: Arifuddin, Arif Subject: Re: [Ssh-sftp-perl-users] Net::SFTP::Foreign; results I think in place of from and to in below statement if (!$sftp->rget("/from*", "/to")) { print "Failed to Transfer: ".$sftp->error; } try to pass exact name of directory. For testing purpose if that is working then you need to store this from and to in some variable and then use those variable in this function. I am not expert but may be this can help you bit. --- On Fri, 10/30/09, Arifuddin, Arif <Ari...@xe...> wrote: From: Arifuddin, Arif <Ari...@xe...> Subject: [Ssh-sftp-perl-users] Net::SFTP::Foreign; results To: ssh...@li... Date: Friday, October 30, 2009, 6:01 AM Help: i have the following script running but i get the results as such? #!/usr/bin/perl use lib '../modules'; use strict; use Net::SFTP::Foreign; $|=1; print "Connecting..."; my $sftp = Net::SFTP::Foreign->new('ipaddress', user=>'xyz', password=>'123'); if (not $sftp) { die("Error: No Connection:$@"); } elsif ($sftp->error) { die("Connect Failed : ".$sftp->status); } else { print "Connected!\n"; if (!$sftp->rget("/from*", "/to")) { print "Failed to Transfer: ".$sftp->error; } else { print "Transfer Done!!"; } print "\nFinished\n"; end of script: Why am i getting the following result....if someone can help? Connecting...Connected! Failed to Transfer: Couldn't stat remote file (lstat): No such file regards, Ari...@Xe... ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Ssh-sftp-perl-users mailing list Ssh...@li... https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |