From: Jochen Kaechelin Date: 2006-12-17T09:06:56+09:00 Subject: Re: question about .gsub I found a script which solves my problem: #!/usr/local/bin/ruby require 'find' dirs = ["/Users/aragon/Sites"] excludes = [] for dir in dirs Find.find(dir) do |path| if FileTest.directory?(path) if excludes.include?(File.basename(path)) Find.prune # Don't look any further into this directory. else next end else puts path end end end Thanx.