From: kiol Date: 2006-02-22T14:13:31+09:00 Subject: Re: Newbie: need suggestion for "the ruby way" thanks a lot. I just want to index the files and only files in some directory. like this: dir_a/dir_b/file_c dir_a/file_d will indexed as file_c->dir_a/dir_b/file_c file_d->dir_a/file_d and dump this with YAML. Now I think I can do that like this: Dir.chdir(d) do File.open('indexs.yaml', 'w') do |idx_file| require 'yaml' indexs = {} Dir.chdir(dir.path) do Dir['**/*'].reject {|item| File.directory?(item)} end YAML.dump(indexs, idx_file) end end so I do't need the recursive procudure.