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.