http://www.perlmonks.org?node_id=188194


in reply to FTP files from multiple source directories to multiple target directiories

The easiest way to do this is to use Net::FTP. Here is a simple bit of code that FTPs a single file:
use Net::FTP; chdir "/tmp"; $ftp = Net::FTP->new("some.host.name", Debug => 0); $ftp->login("anonymous",'-anonymous@'); $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp->quit;
Then use this basic idea in a loop over files for each source directory.

-Mark

  • Comment on Re: FTP files from multiple source directories to multiple target directiories
  • Download Code