From: ToRA Date: 2006-07-10T03:15:11+09:00 Subject: Re: renaming files randomly Hey, You could rewrite without the zip and the temporary variable... ala: Dir.chdir("photos") do Dir["*"].sort_by{rand}.each_with_index do |f,n| File.rename(f, n.to_s) end end Though be careful, you've just lost the file-name extension, and unpretty things could happen if you run the script over the same directory multiple times (which I guess could happen when you want to re-shuffle the playlist). Regards, Tris