Solved

Delete all files from an ftp folder

Posted on 2013-11-27
3
450 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now