Thread: FTP a file

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    1
    Rep Power
    0

    Unhappy FTP a file


    I have a client that would like to send an XML file generated from their website to another webserver's FTP directory to be later picked up by a robot and processed. I have written the portion of the code that will generate the file, however I do not know how to then send it to the FTP server using c#.

    Any help in this matter would be most appreciated.

    Thank you very much in advance.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    1
    Rep Power
    0
    Hi Sizzler

    Maybe this is not of a gret help but you can use a batch script to do this.

    file1.cmd:

    ftp -i -n -v -s:file2.txt

    file2.txt

    open <ip address>
    user <username> <password>
    cd <directory_to_go>
    binary
    put file.xml
    quit

    Sure this is a far from ideal solution, specially because of the plain text passowrd on file2, but depending on the situation you can live with that.

IMN logo majestic logo threadwatch logo seochat tools logo