From: Kurt Euler Date: 2002-08-29T01:04:35+09:00 Subject: How to read files in all subdirectories? Ruby experts: I know how to read each file in a subdirectory using the code below. My question is: How can this code be modified so that the code will, in addition, read each file in all subdirectories below "some_directory"? (I think what I want is a way to read all subdirectories "recursively".) Thanks in advance! Kurt Euler Dir.new("./some_directory").each { |fname| if (File.file? "./some_directory/"+fname) File.open("./some_directory/"+fname) { |file| do_stuff_here } end }