From ruby-talk Tue Mar 23 11:18:28 2004 From: Emmanuel Touzery Date: Tue, 23 Mar 2004 11:18:28 +0000 To: ruby-talk Subject: Re: Create a directories list with sub-directories Message-Id: <40601D87.50609 () wanadoo ! fr> X-MARC-Message: https://marc.info/?l=ruby-talk&m=108004074203864 Hello, Dirk Einecke wrote: > Hi. > > I've a problem. How can I create a directory list with all > sub-directories and files like this: > > |- root > |- folder1 > |- filex > |- folder2 > |- folderx > |- file1 > |- filex > |- filey > > At the moment I've only a way to read one directory and print the > directories and files therein. But that is not enough. Can anybody > help me or give me a hint where I can helpfull examples? To get all those files, simply do require 'find' Find.find('.') {|path| puts path} emmanuel