From: Bil Kleb Date: 2006-07-10T01:05:06+09:00 Subject: Re: renaming files randomly dblack@wobblini.net wrote: > > Dir.chdir("photos") do > files = Dir["*"] > new_names = [*0...files.size].sort_by { rand } > files.zip(new_names).each do |f,n| > File.rename(f, n.to_s) > end > end Thanks David. I'll push that over and see what comes back. Also, thanks for showing "zip" in action -- I just learned about that one a couple months ago and hadn't figured out a place to use it yet. Regards, -- Bil http://fun3d.larc.nasa.gov