On 24.03.2008 19:27, Adam Boyle wrote: > I mixed up sub-folders and files. I meant to say that I want to sort > files before sub-folders (so that the folder that a file resides in > comes right before the file in the list). Why do you need that? I mean, if a folder is excluded then you want to exclude all files and subfolders, don't you? > 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