From: eden li Date: 2006-10-11T01:10:11+09:00 Subject: Re: (NEWBIE) Reading folders from a directory into an array Dir['/path/*'].select { |f| File.directory? f }.each do |directory| # do your thing end Read more at http://www.rubycentral.com/book/ref_c_dir.html