Are you asking how to move directories within a site using FTP? If so, the FTP protocol, itself, is not really designed to do that. You are much, much better off finding a way to shell onto that system, and using it's native copy comamnds.

Otherwise, if you're stuck with FTP, 2 ideas come to mind:

  1. See if the quot comamnd in Net::FTP allows you to do something like $ftp->quot('cp -R /home/dir1/* /home/dir2');, or
  2. Simply get the files to your local system, and then put them into the new directory on the remove system.
Hopefully, some of this helps. It's hard to aid more without more on your situation, marto's comments and links to how to do a write-up are well worth the reading and using. Help us help you, please. :)

----Asim, known to some as Woodrow.


In reply to Re: Need help with moving files via FTP by Asim
in thread Need help with moving files via FTP by Anonymous Monk

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.