From: Suraj Kurapati Date: 2010-08-24T05:32:06+09:00 Subject: Re: directory listing without . and .. Robert Klemme wrote: > dirs = Dir[File.join(path, '*')].select {|x| File.directory? x} Use the directory matching power of file globbing patterns: dirs = Dir["#{path}/*/"] Here, the '/' suffix makes the pattern match directories only! Also, note that File.join() always uses '/', even on Windows: http://www.ruby-forum.com/topic/50137 Cheers. -- Posted via http://www.ruby-forum.com/.