Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

( #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 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-05 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls