Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-11-26 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls