From: Chris Brand Date: 2008-06-01T16:14:58+09:00 Subject: Re: NET::SFTP downloading multiple directories. Ok so I got a little further with this, but its still not working perfectly... I think the wait method is screwing things up, because I only get the contents of the first folder. #!/usr/bin/env ruby require 'FileUtils' require 'net/sftp' $local_dir = '/iBak' + Time.now.strftime("%m_%d_%y") $user_name = 'root' $backup_dirs = ['/Applications', '/var/root/Library/Customize2', '/var/mobile/Library/Installer', '/var/mobile/Media/EBooks', '/var/preferences' ] puts "Please enter your iPhones IP address:" $phone_ip = gets.chomp! puts "Now your password:" $root_pass = gets.chomp! puts "\nPress enter to begin..." gets FileUtils.mkdir_p $local_dir Net::SFTP.start( $phone_ip, $user_name, :password => $root_pass ) do |backup| dls = $backup_dirs.map { |f| backup.download!( f, $local_dir, :recursive => true) } dls.each do |d| d.wait end end Again, any help would be great! -Chris -- Posted via http://www.ruby-forum.com/.