Mistři v programování na #hovnokod

Ruby #276

m = 0
loop do 
  Dir.foreach(".") do |file|
    if file =~ /Screenshot \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~

HovnoKod,