From: Igor Pirnovar Date: 2009-02-21T04:09:53+09:00 Subject: Re: "permission denied" Peter Bailey wrote: > Hi, > I'm frustrated with one of my Ruby scripts. It's an image processing > script that converts [sometimes thousands] of images and then HTTPs on > to archival servers. I continue to get a "permission denied" error on > one out of many files. Why not implementing something like the following to salvage your processing, document (LOG) the problem and deal with it latter: ... success = ProdOrca.sendPNG pngfile if success == true then ftpfile = File.new(filesuccess, "w") ftp.putbinaryfile(filesuccess) ftpfile.close File.open("E:/logs/StatusReports/InfoConFiles.log", ... else ftpfile = File.new(fileerror, "w") ftp.putbinaryfile(fileerror) ftpfile.close File.open("E:/logs/StatusReports/InfoConFiles.log", ... end ####### Salvage your operation and log the problematic files ###### begin FileUtils.rm(pngfile) <----- This is what it's complaining about. rescue puts "LOG: #{File.expand_path(file)} can not be handled" end ... -- Posted via http://www.ruby-forum.com/.