?
Solved

Delete all files from an ftp folder

Posted on 2013-11-27
3
Medium Priority
?
465 Views
Last Modified: 2013-11-28
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;
0
Comment
Question by:Dovberman
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
johny_bravo1 earned 2000 total points
ID: 39682623
See if this helps,

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

check DeleteFileOnServer
0
 

Author Comment

by:Dovberman
ID: 39683195
That works.

Thank you.
0
 

Author Closing Comment

by:Dovberman
ID: 39683197
That works.

Thank you
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question