From: Joby Bednar Date: 2006-02-22T03:08:42+09:00 Subject: Re: Newbie: need suggestion for "the ruby way" It might be more helpful to show what kind of output you want, rather than what code you've created. However, for a simple recursive directory listing, look more into the Dir object: depth = 1 #current or one directory down files = Dir['**/*'].reject {|item| #filter out directories and directory depth File.directory?(item) or File.dirname(item).split('/').size > depth } puts files You can add more logic to filter out other files, organize them in a tree-like structure, etc. But, the Dir object and methods are VERY useful when used with File and other common Array and String methods.