From: Peter Bailey Date: 2006-05-04T05:23:47+09:00 Subject: Re: problems ftp'ing with RUBY Ryan Leavengood wrote: > On 5/3/06, Peter Bailey wrote: >> >> require 'net/ftp' >> indexfiles = Dir.glob("*.pdf") >> indexfiles.each do |indexfile| >> ftp = Net::FTP.open('mpc.bna.com') do |ftp| >> ftp.login('username','password') >> ftp.chdir('/data/bnaindex') >> ftp.putbinaryfile("indexfile") > > I suppose no one has pointed out that the above line is probably a > bug. Here you are telling the FTP library to put a binary file called > indexfile, not using the contents of the variable indexfile. Therein > lies the problem, as far as I can see. > > Regards, > Ryan You mean, I shouldn't have it in quotes, right? Or, should I use (#{indexfile})? I have been told in the past to use that #{ nomenclature. Now I see why. Thank you! -- Posted via http://www.ruby-forum.com/.