From: Vincent Fourmond Date: 2007-01-15T06:32:19+09:00 Subject: Re: File.rename says file name is to long Lovell wrote: > test = [] > > Dir.chdir("/Users/lem/pictures/") > > test[test.length] = Dir.entries("Amber Copy") > > test.to_s.each do |pics| test.to_s is a single string containing the concatenation of all the names of the files in the "Amber Copy" directory. See: irb(main):001:0> t = [1,2] => [1, 2] irb(main):002:0> t.to_s => "12" irb(main):003:0> t.to_s.each do |a| p a end "12" => "12" > I have a feeling its something simple but I just can't seem to grasp > what it is, can anyone drop me a hint? Indeed ;-) ! Removing the unnecessary to_s should do the trick. Cheers, Vince -- Vincent Fourmond, PhD student http://vincent.fourmond.neuf.fr/