From: ts Date: 2002-09-13T02:05:45+09:00 Subject: Re: Problem with Net::FTP.getbinaryfile >>>>> "B" == Brian C Young writes: B> ftpConnection.list("*.tgz") {|fileInfo| B> fInfo = fileInfo.split() B> fileName = fInfo[8] B> fileSize = fInfo[4].to_i B> print "fetching ", fileName, ", ", fileSize, " bytes...\n" B> ftpConnection.getbinaryfile(fileName, fileName) The problem is here : you can't mix 2 FTP commands. You must first execute #list then #getbinaryfile B> } Something like this list = [] ftpConnection.list("*.tgz") {|fileInfo| fInfo = fileInfo.split() fileName = fInfo[8] fileSize = fInfo[4].to_i list << [FileName, fileSize] } list.each {|FileName, fileSize| print "fetching ", fileName, ", ", fileSize, " bytes...\n" ftpConnection.getbinaryfile(fileName, fileName) } Guy Decoux