Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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?
[pryrt]: stevieb: going thru cblast to get caught up, I see that strawberry fixed their download hashes. Fast turnaround on that fix. :-)
[pryrt]: Are you going to tie the berrybrew expected hashes to their releases.json to keep it always up-to-date?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-03-30 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (357 votes). Check out past polls.