From: "Jesús Gabriel y Galán" Date: 2008-05-30T16:38:24+09:00 Subject: Re: Find files On Fri, May 30, 2008 at 4:46 AM, Clement Ow wrote: > But apparently, the file exception doesnt seem to work.. It doesnt just > exclude the file exceptions that has the file extentions .txt and .xls, > it excludes the whole list of files in the first 2 source paths, and > only executes the files in the 3rd source path. I presume it should be > something really wrong with the: >>> src1 << file unless $file_exception[i].each{|x| /#{x}/ =~ File.basename(file)} > that I cant quite figure(i tried figuring for days!) Help anyone? =) Sorry, I don't have more time to look deeper into this, but with regards to the above line, the each method returns the original enumerable, so in the general case I think the xxx.each will never be false, and so the "unless xxx.each" will always happen. Don't know if this solves your problem though. If I have more time later I'll try to take a deeper look. Jesus.