Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/scp'
- Net::SCP.start("mrsu.ru", "", :password => "" ) do |scp|
- scp.upload("/home/icmrsu/generation3/public/templates/.", "/home/bitrix/www/sveden" , :recursive => true) do |ch, name,sent, total|
- if (sent == total)
- puts "#{name}"
- end
- end
- end
- Net::SCP.start("mrsu.ru", "", :password => "" ) do |scp|
- count = Dir["/home/icmrsu/generation3/public/uploads/*"].length
- i = 0
- scp.upload("/home/icmrsu/generation3/public/uploads/.", "/home/bitrix/www/sveden/uploads", :recursive => true) do |ch, name, sent, total|
- if (sent == total)
- i+=1
- puts "#{i}/#{count} : #{name}"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement