- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
m = 0
loop do
Dir.foreach(".") do |file|
if file =~ /Снимок экрана \d+\.png/
Dir.foreach("docs") do |file2|
if file2 =~ /(\d+).png/
m = $1.to_i if $1.to_i > m
end
end
puts "moving#{file} to docs/#{m+1}.png"
File.rename(file,"docs/#{m+1}.png")
end
end
sleep 5
end~