From: Andrew Wagner Date: 2010-12-23T22:39:42+09:00 Subject: Re: simple counting in Ruby --001636c5a93864d7790498140080 Content-Type: text/plain; charset=UTF-8 Hm, that works for me. And so does: Dir["*.pdf"] On Thu, Dec 23, 2010 at 8:35 AM, Peter Bailey wrote: > Hello, > Can someone please tell me how to get a count for the number of files in > a directory? > Example: > files = Dir.glob("*.pdf") > puts files.count ?? > > That doesn't work, but, I'd love to know what would work. > Thanks, > Peter > > -- > Posted via http://www.ruby-forum.com/. > > --001636c5a93864d7790498140080--