Is it possible to delete non empty folder in web? I cant delete it using this code as long as its non empty folder.
I can delete files under the folder but folder may consist sub folders too. Whats is the simple way to do this?
Dim clsRequest As System.Net.FtpWebRequest = _
DirectCast(System.Net.WebRequest.Create("ftp://ftp.server.com/folder), System.Net.FtpWebRequest)
clsRequest.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
'
clsRequest.Method = System.Net.WebRequestMethods.Ftp.RemoveDirectory
Dim response As FtpWebResponse = CType(clsRequest.GetResponse, FtpWebResponse)
response.Close()