Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Answer: FTP files from multiple source directories to multiple target directiories

by kvale (Monsignor)
on Aug 06, 2002 at 23:02 UTC ( #188194=categorized answer: print w/replies, xml ) Need Help??

Q&A > HTTP and FTP clients > FTP files from multiple source directories to multiple target directiories - Answer contributed by kvale

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 Answer: FTP files from multiple source directories to multiple target directiories
  • Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-06-24 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?