From: Kirk Haines Date: 2005-07-26T08:52:24+09:00 Subject: Re: Script to walk a directory tree On Monday 25 July 2005 5:33 pm, Eric Hodel wrote: > On 25 Jul 2005, at 16:22, Kyle Heon wrote: > > Can anyone point me in the direction of how to walk a directory tree > > recursively? > > > > I'm not having much luck finding code samples via Google. > > require 'find' > > Find.find('/your/path') do |f| > # if you want to skip all dirs > next if File.directory? f > puts "at: #{f}" > end Much better than implementing it manually, but the fun thing about manually is that it's not that much longer. Love Ruby. Kirk Haines