Skip to content

Instantly share code, notes, and snippets.

@eduardodx
eduardodx / ruby_shuffle_files.rb
Created June 26, 2011 13:38
Ruby Shuffle Files
# encoding: utf-8
# Ruby script to shuffle files, pass the folder name as the first argument (necessary),
# and -f after folder name if you want to really sort them
# example: ruby ruby_shuffle_files.rb my_folder -f
folder = ARGV[0] + "/"
loop_times = (ARGV[1] != nil && ARGV[1] == "-f") ? 3 : 1
qtd_files = 0