mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 11:32:24 -05:00
10 lines
253 B
Ruby
10 lines
253 B
Ruby
|
all_files = [Dir["*.jpg"] + Dir["*.jpeg"]].flatten
|
||
|
all_files.each do |f|
|
||
|
File.rename(f, "#{rand(2**256).to_s(36)[0..7]}.jpg")
|
||
|
end
|
||
|
|
||
|
all_files = [Dir["*.jpg"] + Dir["*.jpeg"]].flatten
|
||
|
all_files.each_with_index do |f, i|
|
||
|
File.rename(f, "#{i}.jpg")
|
||
|
end
|