From: Robert Klemme Date: 2010-03-23T01:48:42+09:00 Subject: Re: Reading contents of all files from a Directory 2010/3/22 jbw : > Also might want to check if it is a file and skip directories: > > puts Dir["/*"].map { |f| if(!File.directory?(f)) then File.read f end } Good point! Dir["dir/*"].each{|f| test ?f,f and puts File.read(f)} :-) Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/