require 'find'Find.find('./') do |path| if File.basename(path) =~ /file2$/ puts "PRUNED #{path}" Find.prune end puts pathend