In addition, you may also wish to look at the samples in the FTP Stuff section of the Code Catacombs.

You did not say why a standard FTP program was failing. Is it timing out? Failing because of the size of the directory? Or was it failing because you need something with a little more power to do things like lowercase or uppercase all filenames, remove spaces, and/or split the files into directories by one or more initial letters or something?

Hopefully the excellent references suggested thus far by respondents to your post will be of help. Failing that, posting additional information may allow someone to offer you additional ideas or snippets that may be useful. In either case, I hope you find what you seek, and, perhaps, will even take time to post the solution you find, to aid those who may come after with similar needs.

Update: You may also wish to check the Snippets Section for postings. grinder has an interface which may make that easier to do for what you seek.

Update: Found a basic snippet of code I had that might help you get started.

# # Assumes %filelist and %connectinfo defined and # filled earlier # my $ftp = Net::FTP->new($connectinfo{'host'}; $ftp->login($connectinfo{'user'}, $connectinfo{'pass'}); my $current_target_directory = ""; foreach my $filename (sort(keys(%filelist))) { if ($current_target_directory ne $filelist{$filename}{'target'}) { $current_target_directory = $filelist{$filename}{'target'}; $ftp->cwd($current_target_directory); } $ftp->put($filename); print($filename, "\n"); } $ftp->quit;

Update: Modified title.


In reply to Re^2: FTP Question by atcroft
in thread FTP Question by LostS

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.