Moving a file on a FTP server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K Viltersten

    #1

    Moving a file on a FTP server

    I've found a couple of examples for moving a
    file on a FTP server to another location but
    all of them required something like this.

    char[] command = "PASV\r\n".ToCh arArray();
    Byte[] cmd = Encoding.ASCII. GetBytes(comman d);
    ftpSocket.Send( cmd, cmd.Length, 0);
    readResponse();

    Is that neccessary or can i do remote, FTP
    file management using e.g. FtpWebRequest
    class? If so, how?

    --
    Regards
    Konrad Viltersten
    ----------------------------------------
    May all spammers die an agonizing death;
    have no burial places; their souls be
    chased by demons in Gehenna from one room
    to another for all eternity and beyond.


  • Adam Benson

    #2
    Re: Moving a file on a FTP server

    For any kind of FTP work buy yourself an FTP component.

    You will save yourself weeks of time.

    For example, see http://xceed.com/FTP_NET_Intro.html

    Cheers,

    Adam.
    ==========


    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: Moving a file on a FTP server

      K Viltersten wrote:
      I've found a couple of examples for moving a
      file on a FTP server to another location but
      all of them required something like this.
      >
      char[] command = "PASV\r\n".ToCh arArray();
      Byte[] cmd = Encoding.ASCII. GetBytes(comman d);
      ftpSocket.Send( cmd, cmd.Length, 0);
      readResponse();
      >
      Is that neccessary or can i do remote, FTP
      file management using e.g. FtpWebRequest
      class? If so, how?
      The WebRequest and WebClient stuff is URL oriented - single
      URL oriented, so it does not have support for FTP features
      like rename, which is what you want.

      Write something yourself or find something already written.

      Arne

      Comment

      Working...