Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Using Net/FTP to download a file (FTP Error 550)

Reply
Thread Tools

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

 
 
Jeff Miller
Guest
Posts: n/a
 
      03-26-2009
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_p assword}",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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing Download of File Appends HTML from Download Page to Downloaded File? Brett Kelly ASP .Net 1 06-16-2006 04:05 AM
problem with code download file - two window file download Sam -- ASP .Net 2 03-17-2005 04:20 PM
Re: How can I display a download link in my (C#) ASP.NET web form to download a file stored in my sql db? Steve C. Orr [MVP, MCSD] ASP .Net 0 03-07-2005 07:14 PM
File upload/download from database. Download appends aspx page to end of file Ryan Taylor ASP .Net 2 11-10-2004 08:31 PM



Advertisments