I'm afraid to say that I don't know of
any ftp server programs that allow a cascading delete. You'll have to go through each folder, do a listing, delete all files, and repeat process for each folder, deleting the parent folder after all children are gone. I think if you do a
Super Search you will find some examples of the code you'll need.
Update: or, as
ctilmes mentions, you could allow
Net::FTP::Recursive to do the dirty work for you! :^)
If you have access to the server via a shell, you can issue an 'rm -rf' command if it's unix/linux or 'rmdir /S /Q' if it's windows. You could have the ftp script execute this via a SSH or Telnet connection to keep it all in the same script.
Update: Since you state in your previous question that you normally telnet into the server, you can use Net::Telnet.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.