in reply to Re: net::sftp remove storing files for get and remove
in thread net::sftp remove storing files for get and remove
Thanks, Chris.#!/usr/bin/perl -w use Net::SFTP::Foreign; my $host = 'xxxx.xxxxxxxxxx.com'; my $sftp = Net::SFTP::Foreign->new($host, user=>'username', password=>'password'); $sftp->die_on_error("Unable to establish SFTP connecti +on"); my @files = $sftp->ls('/xxxx/xxxxx/outbound'); foreach my $f ( @files ) { foreach my $file_ref ( @{$f} ) { #print "$file_ref->{'filename'}\n"; $sftp->get("/xxxx/xxxxx/outbound/$file_ref->{'filename'}","/xx +x/xxx/xxx/local_inbound/"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: net::sftp remove storing files for get and remove
by jethro (Monsignor) on Aug 08, 2011 at 01:23 UTC |