Home All Groups Group Topic Archive Search About
Author
24 Mar 2006 10:01 PM
Thom Little
Is there an example of the use of the 2.0 FTP RemoveDirectory ... anywhere?

--
--  Thom Little  --  www.tlanet.net  --  Thom Little Associates, Ltd.
--

Author
25 Mar 2006 12:08 PM
Emil Kvarnhammar
Hi,

Something like this would probably work:

public static void Main(string[] args)
{
      Uri uri = new Uri(args[0]);
      FtpWebRequest request = (FtpWebRequest) WebRequest.Create(uri);

      request.Method = WebRequestMethods.Ftp.RemoveDirectory;
      request.Credentials = new
NetworkCredential("anonymous","x@nospam.com");

      FtpWebResponse response = (FtpWebResponse) request.GetResponse();
      Console.WriteLine("status: {0}",response.StatusDescription);
      response.Close();
}

regards
Emil Kvarnhammar

Show quote
"Thom Little" <t***@tlanet.net> skrev i meddelandet
news:%23Yg4R64TGHA.4772@TK2MSFTNGP09.phx.gbl...
> Is there an example of the use of the 2.0 FTP RemoveDirectory ...
> anywhere?
>
> --
> --  Thom Little  --  www.tlanet.net  --  Thom Little Associates, Ltd.
> --
>
>
>
Author
25 Mar 2006 5:31 PM
Thom Little
That is what I assumed also and it was not operating correctly.  With your
response I looked closer and found that my test directory structure was not
what I assumed.

It is now corrected.

Thanks for the help.

--
--  Thom Little  --  www.tlanet.net  --  Thom Little Associates, Ltd.
--

Show quote
"Emil Kvarnhammar" <info at ynax.com> wrote in message
news:O6R6JTAUGHA.4340@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Something like this would probably work:
>
> public static void Main(string[] args)
> {
>      Uri uri = new Uri(args[0]);
>      FtpWebRequest request = (FtpWebRequest) WebRequest.Create(uri);
>
>      request.Method = WebRequestMethods.Ftp.RemoveDirectory;
>      request.Credentials = new
> NetworkCredential("anonymous","x@nospam.com");
>
>      FtpWebResponse response = (FtpWebResponse) request.GetResponse();
>      Console.WriteLine("status: {0}",response.StatusDescription);
>      response.Close();
> }
>
> regards
> Emil Kvarnhammar
>
> "Thom Little" <t***@tlanet.net> skrev i meddelandet
> news:%23Yg4R64TGHA.4772@TK2MSFTNGP09.phx.gbl...
>> Is there an example of the use of the 2.0 FTP RemoveDirectory ...
>> anywhere?
>>
>> --
>> --  Thom Little  --  www.tlanet.net  --  Thom Little Associates, Ltd.
>> --
>>
>>
>>
>
>

AddThis Social Bookmark Button