From: Adam Boyle Date: 2008-03-26T00:14:55+09:00 Subject: Re: Find.find sorting: files before directories This is exactly what I was looking for. Thank you for your time and effort! > require 'find' > > base='.' > excludes = [] > dirs = Hash.new {|h,p| h[p]=[]} > > Find.findbase do |path| > if File.directory? path > Find.prune if excludes.include? path > else > dirs[File.dirname(path)] << path > end > end > > dirs.sort.each do |dir,files| > puts "SetOutPath #{dir}" > files.each {|f| puts "File #{f}"} > end