Dear Perl Monks,

Strawberry Perl 5.24.0.1 for Windows.
$ rpm -qa \*vsftp\* vsftpd-3.0.3-3.fc25.x86_64
I am trying to recursively delete directories on an FTP server (vsftp) with Net::FTP with Windows with Perl 5
$ftp->rmdir ( "${Ordered_List[$Index]}", 1 );
Problem:  $ftp->rmdir doesn't wait for the operation to finish.  And if I go on to another FTP command of any type before rmdir finishes, the rmdir command will terminate, leaving the directory, or what is left of it, in place.  I am having to guess at how long to wait with the "sleep" command.

How do I wait for rmdir to finish and not guess at it?  The directory size could be a big as 30 GB in the future.

Many thanks,
-T


In reply to Need Net::FTP rmdir time out help by Todd Chester

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.