> Why do you need that?  I mean, if a folder is excluded then you want to
> exclude all files and subfolders, don't you?

Yes, an excluded folder would also exclude its children files and
folders.

I'm thinking that I haven't exactly made it clear what my goal is...

Using Find.find, I want to traverse through a directory structure and
make an NSIS-style list of files and their paths for use in an NSIS
installer script.  A list of this sort would be best organized if a
directory's file children are listed before the directory children.

Example:
SetOutPath "jruby-1.0.3/docs"
File       "jruby-1.0.3/docs/README.rails"
File       "jruby-1.0.3/docs/README.coverage"
File       "jruby-1.0.3/docs/Readline-HOWTO.txt"
File       "jruby-1.0.3/docs/LICENSE.bouncycastle"
File       "jruby-1.0.3/docs/LICENSE.ant"
File       "jruby-1.0.3/docs/LICENCE.bsf"
File       "jruby-1.0.3/docs/Glossary.txt"
File       "jruby-1.0.3/docs/getting_involved.html"
SetOutPath "jruby-1.0.3/docs/rbyaml"
File       "jruby-1.0.3/docs/rbyaml/README"
File       "jruby-1.0.3/docs/rbyaml/LICENSE"
SetOutPath "jruby-1.0.3/docs/jvyaml"
File       "jruby-1.0.3/docs/jvyaml/README"
File       "jruby-1.0.3/docs/jvyaml/LICENSE"
File       "jruby-1.0.3/docs/jvyaml/CREDITS"
...


The "SetOutPath" lines are the directories, the "File" lines are the
files.

The code you gave will gave results like this (once I used Ruby
instead of JRuby :)...):
SetOutPath jruby-1.0.3
SetOutPath jruby-1.0.3/samples
File       jruby-1.0.3/samples/xslt.rb
File       jruby-1.0.3/samples/thread.rb
File       jruby-1.0.3/samples/swing2.rb
File       jruby-1.0.3/samples/scripting.rb
File       jruby-1.0.3/samples/javascript.rb
File       jruby-1.0.3/samples/java2.rb
File       jruby-1.0.3/samples/error.rb
File       jruby-1.0.3/samples/dom-applet.html
File       jruby-1.0.3/samples/applet.html
File       jruby-1.0.3/README
SetOutPath jruby-1.0.3/lib
SetOutPath jruby-1.0.3/lib/ruby
SetOutPath jruby-1.0.3/lib/ruby/site_ruby
SetOutPath jruby-1.0.3/lib/ruby/site_ruby/1.8
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/ubygems.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/securerandom.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems.rb
SetOutPath jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/version.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/validator.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
user_interaction.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/timer.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
specification.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
source_info_cache_entry.rb
...


The issue is that it is very important that the SetOutPath call for
any particular file comes directly before it in the list (ie,
SetOutPath jruby-1.0.3 for the line File jruby-1.0.3/README).  That
way the output path is set correctly when the file is extracted from
the installer executable.

The selected lines from the previous example would ideally be listed
this way:
SetOutPath jruby-1.0.3
File       jruby-1.0.3/README
SetOutPath jruby-1.0.3/samples
File       jruby-1.0.3/samples/xslt.rb
File       jruby-1.0.3/samples/thread.rb
File       jruby-1.0.3/samples/swing2.rb
File       jruby-1.0.3/samples/scripting.rb
File       jruby-1.0.3/samples/javascript.rb
File       jruby-1.0.3/samples/java2.rb
File       jruby-1.0.3/samples/error.rb
File       jruby-1.0.3/samples/dom-applet.html
File       jruby-1.0.3/samples/applet.html
SetOutPath jruby-1.0.3/lib/ruby/site_ruby/1.8
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/ubygems.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/securerandom.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems.rb
SetOutPath jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/version.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/validator.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
user_interaction.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/timer.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
specification.rb
File       jruby-1.0.3/lib/ruby/site_ruby/1.8/rubygems/
source_info_cache_entry.rb
...


It's beginning to seem to me that Find.find just doesn't have an easy
way of sorting the elements being traversed.  Any additional help is
greatly appreciated.

> > I tried the posted code, but I couldn't get it to run.  Some String
> > comparison problem.
> > ---------output---------------
> > SetOutPath jruby-1.0.3
> > SetOutPath Djruby-1.0.3/..
> > C:/ruby/jruby-1.0.3/lib/ruby/1.8/find.rb:45:in `find': comparison of
> > String with String failed (ArgumentError)
> >         from :1:in `catch'
> >         from C:/ruby/jruby-1.0.3/lib/ruby/1.8/find.rb:38:in `find'
> >         from :1
> > --------------end output-------
>
> I have no idea what's wrong there.  Did you try with the Ruby
> interpreter (instead of JRuby)?
>
>         robert