Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Pathologically Eclectic Rubbish Lister
 
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 drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-04-18 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls