bbi has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use Net::FTP; use File::Listing qw(parse_dir); $host = 'ServerName'; $path = '/home/'; $ftp = Net::FTP->new($host, Timeout => 1800) or die "Cannot contact $h +ost: $!"; $ftp->login('ID', 'PWD') or die "Cannot login ($host):" . $ftp->messag +e; $ftp->cwd($path) or die "Cannot change directory ($host):" . $ftp->mes +sage; #@Files = $ftp->ls('-lR'); @Files = $ftp->!ls ('-l'); #$ftp->binary(); #$ftp->ascii(); foreach $file (parse_dir(\@Files)) { my($name, $type, $size, $mtime, $mode) = @$file; $ftp->put("$name") or warn "Could not get $name, skipped: $!"; } $ftp->quit; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ftp put problem!
by runrig (Abbot) on Jul 29, 2008 at 20:03 UTC | |
by bbi (Initiate) on Jul 29, 2008 at 20:26 UTC | |
by runrig (Abbot) on Jul 29, 2008 at 20:33 UTC | |
|
Re: ftp put problem!
by jrsimmon (Hermit) on Jul 29, 2008 at 20:25 UTC | |
by bbi (Initiate) on Jul 29, 2008 at 20:42 UTC | |
by runrig (Abbot) on Jul 29, 2008 at 21:00 UTC | |
by bbi (Initiate) on Jul 29, 2008 at 21:06 UTC | |
by runrig (Abbot) on Jul 29, 2008 at 23:55 UTC | |
|
Re: ftp put problem!
by jethro (Monsignor) on Jul 29, 2008 at 20:22 UTC | |
by Fletch (Bishop) on Jul 29, 2008 at 20:37 UTC | |
|
Re: ftp put problem!
by Khen1950fx (Canon) on Jul 29, 2008 at 22:43 UTC | |
|
Re: ftp put problem!
by eosbuddy (Scribe) on Jul 29, 2008 at 23:31 UTC |