Roman Leitner wrote:
> Hi all,
> 
> i am quite new to ruby and I was wondering if there is a method in ruby 
> to get a list of folders and subfolders.

The standard Find module should let you do this.

require 'find'

files = []
Find.find( "root" ) do |path|
  files << path if File.basename( path ) == "data.txt"
end

-- 
Posted via http://www.ruby-forum.com/.