On Nov 5, 12:50 pm, [email protected] wrote:
> From: "Parag Kalra" <[email protected]>
> Just did Googly and found this
> -http://search.cpan.org/~drolsky/Net-SFTP-0.08/lib/Net/SFTP.pm
> Hope it helps...
> Cheers,
> Parag
>
> Thank you. I know about it but I couldn't make it work under Windows.
> Does anyone if it can be used under this OS?
>
I believe there are some problematic issues with Net::SSH::Perl
(and Net::SSH::W32Perl) on Win32 although I based this only
on what I saw here:
http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/2996922
cURL is probably an easier option if you're in a hurry. Here's a
snapshot
of a program that sftp's via cURL:
my $curl = 'c:/path/to/curl.exe';
my $options = '--verbose --ftp-ssl --insecure';
if ( $type eq "upload" ) {
$cmd = "$curl $options - user $acct:$pw "
. qq{--quote "CWD $dir" }
. qq{--upload-file "$file" }
. qq{"ftp://$remotehost" };
} elsif ( $type eq "download" ) {
$cmd = "$curl $options -user $acct:$pw "
. qq{--quote "CWD $dir" }
. qq{--output "$file" }
. qq{"ftp://$remotehost/$file" };
}
0 == system( $cmd ) or die "error: curl status = $?";
--
Charles DeRykus
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/