Prince OfThief Prince OfThief - 1 month ago 7x
C# Question

How to recursively delete a folder with the files within using FtpWebRequest?

I want to delete a folder in FTP and it's files recursively.

Any example code do I can implement?


Nice Little example you can find here:

In the example they used WebRequestMethods.Ftp.UploadFile class to direct what kind of operation they want to do.

Use the WebRequestMethods.Ftp.RemoveDirectory method once you have a handle on the parent directory you want to delete: