My program can upload files into an FTP server using this code:
WebClient client = new WebClient();
client.Credentials = new System.Net.NetworkCredential(ftp
You should use FtpWebRequest when you need to delete files:
// Get the object used to communicate with the server.
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverUri);
request.Method = WebRequestMethods.Ftp.DeleteFile;
FtpWebResponse response = (FtpWebResponse) request.GetResponse();
Console.WriteLine("Delete status: {0}",response.StatusDescription);
response.Close();
ref: http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx