From: Peter Bailey Date: 2007-10-07T11:15:04+09:00 Subject: The old File.rename not working again. . . . This always throws me. I keep getting "permission denied" messages when I simply try to rename files. Here's my code. The files in the directory start out without an extension. Dir.chdir("F:/images") Dir.glob("*").each do |file| File.new(file, "r").gets if $_ =~ /%!PS-Adobe/ newfile = file + ".eps" File.rename(file, newfile) end end Thanks, Peter -- Posted via http://www.ruby-forum.com/.