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

**URL:** <https://www.ruby-forum.com/t/using-net-ftp-to-download-a-file-ftp-error-550/163997>\
**Category:** Ruby\
**Created:** [March 26, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/using-net-ftp-to-download-a-file-ftp-error-550/163997 "2009-03-26T18:53:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [March 26, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/using-net-ftp-to-download-a-file-ftp-error-550/163997/1 "2009-03-26T18:53:19Z")

</div>

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 M.
