From: Alexey Petrushin Date: 2011-08-19T07:24:22+09:00 Subject: Re: Searching in a directory And here's how to do it using Virtual File System: require 'vfs' files_with_string = '.'.to_dir.files('*.txt').select do |file| file.read.include?('string to search') end p files_with_string http://github.com/alexeypetrushin/vfs -- Posted via http://www.ruby-forum.com/.