Rescue the exception and continue if the filename matches ?

-----Original Message-----
From: ruby-talk [mailto:ruby-talk-bounces / ruby-lang.org] On Behalf Of Graeme Halls
Sent: Thursday, November 14, 2013 11:45 AM
To: ruby-talk / ruby-lang.org
Subject: FileUtils - Delete all but one file

I am trying to use FileUtils to delete Temporary Internet Files on Windows using IE10, however on every pass it gives an permission denied error on "Counters.dat".

Is there any way I can use FileUtils to delete all but one file, enabling all files to be deleted, but keep the counters.dat file?

It seems a known issue with IE10, but the file doesn't show up in Windows Explorer  when "show hidden files" is ticked, and "hide protected operating system files" is unticked.

Help please!

--
Posted via http://www.ruby-forum.com/.