module Lhj class Command class Rename < Command def run rename end def rename folder_path = "~/Downloads/ss" Dir.glob("#{folder_path}/**/*.{png}").sort.each do |f| filename = File.basename(f, File.extname(f)) File.rename(f, "#{folder_path}/aomi_soldout_" + filename.capitalize + File.extname(f)) end end end end end