Moving Files Around Using Net::FTP : Ftp « Network « Ruby






Moving Files Around Using Net::FTP




require 'net/ftp'
ftp = Net::FTP.new("ftp.ruby-lang.org")

ftp.login
ftp.passive = true

files = ftp.chdir("/pub/ruby")

snapshot = "stable-snapshot.tar.gz"
ftp.getbinaryfile(snapshot, snapshot)

ftp.close

 








Related examples in the same category