0

Hi I want to delete a folder on my ftp
I tried this:

WebRequest request = WebRequest.Create(strPath);
        request.Method = WebRequestMethods.Ftp.RemoveDirectory;
        request.Credentials = new NetworkCredential(strUusername,strUpassword);
        using (var resp = (FtpWebResponse)request.GetResponse())
        {
            Console.WriteLine(resp.StatusCode);
        }

Webexception was unhandled. (550)file not available

strPath = ftp://192....../Media
but in Media are other folders like music, video ,....

Why doesn't work?

1 Answers1

0

I've gotten this error.

Try adding a forward slash to the end of media like:

strPath = ftp://192....../Media/

Still I might agree with the comments, you might need to empty the folder first.

Jason Foglia
  • 2,414
  • 3
  • 27
  • 48