From: Adam Boyle Date: 2008-03-21T00:59:54+09:00 Subject: Re: Find.find sorting: files before directories I forgot to include the require: ------------snip--------------------- require 'find' # oops! dirs = ["jruby-1.0.3"] excludes = [] for dir in dirs folder = '' 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 if folder != File.dirname(path) folder = File.dirname(path) puts 'SetOutPath "' + folder + '"' end puts 'File "' + path + '"' end end end -----------------------end snip-------------------