Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

delete file from FTP c#

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;        
   }    
}    
Comment

PREVIOUS NEXT
Code Example
Csharp :: All SQL Server Tables in a Schema 
Csharp :: beep sound in c# 
Csharp :: c# check if array is empty 
Csharp :: c# method summary new line 
Csharp :: prettier isnt working c# 
Csharp :: public GameObject 
Csharp :: Xamarin.Forms - How to navigate to a tabbed page child page 
Csharp :: ef core detach entity 
Csharp :: c# odd even median 
Csharp :: small modal popup bootstrap 
Csharp :: c# iterate over a dictionary 
Csharp :: remove carriage returns from string c# 
Csharp :: c# random generator 
Csharp :: deltatime 
Csharp :: c# append textbox 
Csharp :: c# generate random number 
Csharp :: c# send email 
Csharp :: c# afficher texte 
Csharp :: custom array initializer in c# 
Csharp :: how to loop over array in c# 
Csharp :: how to convert string to int in c# 
Csharp :: unity new input system keydown 
Csharp :: c# substring from end 
Csharp :: how to make a mouse down condition in unity 
Csharp :: cannot convert string to generic type c# 
Csharp :: dota2 
Csharp :: get roaming folder c# 
Csharp :: unity always rotating object 
Csharp :: xamarin forms open new page on button click 
Csharp :: What is the difference between String and string in C#? 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =