require 'find' require 'fileutils' def removeFiles( path, exts ) Find.find(path) do |f| if File.basename(f) == '.svn' FileUtils.remove_dir(f, true) Find.prune next end ext = File.extname(f) if exts.include?(ext) #File.delete(f) p f end end end
![](http://img.zemanta.com/pixy.gif?x-id=6a028e52-f212-8f73-bf1b-491b0a5866f7)
require 'find' require 'fileutils' def removeFiles( path, exts ) Find.find(path) do |f| if File.basename(f) == '.svn' FileUtils.remove_dir(f, true) Find.prune next end ext = File.extname(f) if exts.include?(ext) #File.delete(f) p f end end end