Madhan Madhan - 17 days ago 6
Perl Question

Download a directory from ftp using perl

Is it possible to download folders from any of repository in ftp using perl?

Answer

Check out Net::Lite::FTP, the synopsis of the module seems to do exactly what you need. I've copied it here for reference:

use Net::Lite::FTP;
my $tlsftp=Net::Lite::FTP->new();
$tlsftp->open("ftp.tls.pl","21");
$tlsftp->user("user");
$tlsftp->pass("password");
$tlsftp->cwd("pub");
my $files=$tlsftp->nlst("*.exe");
foreach $f (@files) {
    $tlsftp->get($f);
};
Comments