So I've decided my file transfer problem can be solved with SFTP (I'd prefer SCP, but you can see from my other posts that I've run into problems with it and I'll just say my last solution broke and I'm going to just give up on SCP for now).

While Net::SFTP looked like it would be great, it doesn't work since I need something that easily does a recursive upload.

I then found Net::SFTP::Recursive this sounded wonderful until I actually read the documentation. It appears you can only transfer files from the remote server to the local box. I need to go from local to remote.

Is there another SFTP module that can do a recursive upload easily?

I tried to write something my self using File::Find to find all the files on the local box, but I ran into trouble with Net::SFTP not creating subdirectories and it started getting really complicated with figuring out the correct directory anyway. If I have to write something myself, how do I get around these problem?

So to summarize I want to know:

Thanks in advance.


In reply to recursive SFTP by xorl

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.