private string DeleteFile(string fileName)
{
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://www.server.com/" + fileName);
request.Method = WebRequestMethods.Ftp.DeleteFile;
request.Credentials = new NetworkCredential("username", "password");
using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
{
return response.StatusDescription;
}
}