Sha256: 647cca395244e620abc4f9e8778b55a8f802fcef1b8439a92d735c67efc08536
Contents?: true
Size: 421 Bytes
Versions: 2
Compression:
Stored size: 421 Bytes
Contents
module Lhj class Command class Rename < Command def run rename end def rename folder_path = "/Users/lihaijian/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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lhj-tools-0.1.1 | lib/lhj/command/rename_image.rb |
lhj-tools-0.1.0 | lib/lhj/command/rename_image.rb |