Using Net/FTP to download a file (FTP Error 550)

Discussion in 'Ruby' started by Jeff Miller, Mar 26, 2009.

  1. Jeff Miller

    Jeff Miller Guest

    Hey guys,
    I'm trying to connect to an FTP site and download the remote files. I
    haven't done this via Ruby before, so please bear with me. I can connect
    to the FTP site no problem, but when I try to download the file, I get
    the error: "550 *** ERROR *** NO BATCHES FOR TRANSMISSION". I've
    iterated over the items in the folder, which are 6 .dat files, so I know
    it can see the files. Here is my code:

    Net::FTP.open(@ftp_host) do |ftp|
    ftp.login(user="#{@ftp_username}",passwd="#{@ftp_password}",acct="")

    ftp.list.each do |item|
    puts item
    ftp.gettextfile(item, localfile=File.basename(item))
    end

    any and all help is appreciated!

    Thanks,
    - Jeff Miller
    --
    Posted via http://www.ruby-forum.com/.
     
    Jeff Miller, Mar 26, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    3,172
  2. Wayne Pierce
    Replies:
    1
    Views:
    2,510
    Daren Russell
    Jun 2, 2004
  3. Guest
    Replies:
    1
    Views:
    167
    David Ross
    Jun 18, 2004
  4. Anthony Landa

    Sun Cobalt RaQ 550 Installation

    Anthony Landa, Jun 21, 2007, in forum: Ruby
    Replies:
    0
    Views:
    119
    Anthony Landa
    Jun 21, 2007
  5. D. Buck
    Replies:
    2
    Views:
    601
    D. Buck
    Jun 29, 2004
Loading...

Share This Page