現在ディレクトリのファイル名を一括リネーム
ruby-2.0.0-p247
$ pry [1] pry(main)> Dir.glob("**").each_with_index do |name, i| File.rename(name, "#{i}.jpg"); end
全部jpgになっちゃうけど
ruby-2.0.0-p247
$ pry [1] pry(main)> Dir.glob("**").each_with_index do |name, i| File.rename(name, "#{i}.jpg"); end
全部jpgになっちゃうけど