Delete all files from an ftp folder

I need to delete all files from an ftp folder.


Can you give me a link to an example?

This is what I have at this point:

//Create a FTP Request Object and Specfiy a Complete Path
                strFTPFilePath = "ftp://" + "StockPickerMax.com" + "/" + "Data/Changes" + "/" + fileName;

                FtpWebRequest reqObj = (FtpWebRequest)FtpWebRequest.Create(new Uri(strFTPFilePath));

                reqObj.Method = WebRequestMethods.Ftp.DeleteFile;
DovbermanAsked:
Who is Participating?
 
Johny BravoConnect With a Mentor Commented:
See if this helps,

http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx

check DeleteFileOnServer
0
 
DovbermanAuthor Commented:
That works.

Thank you.
0
 
DovbermanAuthor Commented:
That works.

Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.