From: Robert Klemme Date: 2008-01-14T19:00:13+09:00 Subject: Re: Counting the files in a directory.... 2008/1/12, Siep Korteling : > > > regards, > > > > Siep > > Should be read as: > > > require 'win32ole' > > fso = WIN32OLE.new("Scripting.FileSystemObject") > > folder = fso.GetFolder("C:/WINDOWS/system32") > > puts folder.Files.count Did you verify that this is faster? I am skeptical because this call does basically the same: it gets the list of files in the directory and counts them. I would expect a speedup only if there was an API function that would directly return the number of files. Kind regards robert -- use.inject do |as, often| as.you_can - without end