From: Martin DeMello Date: 2009-04-03T08:38:46+09:00 Subject: Re: hash with files On Fri, Apr 3, 2009 at 4:17 AM, Derek Smith wrote: > > Hi Martin, > > here it is. its also in the attachment. > > > Dir.chdir("/cygdrive/c/temp/log") or raise StandardError, "Change dir > failed to ~aevvrlog!" > > > ###-- Create hash with files for rolling from dir above --### > dirhsh    = Hash.new 0 > dirhsh["vrdevlogs"]   = Dir.glob("*.{log,out}") > dirhsh["vrdevgzlogs"] = Dir.glob("*.{log,out}.gz") Note that Dir.glob returns an array, since there could be several matching files > if ( dirhsh.length > 0 ) >    puts "yes" >    dirhsh.each_value { |value| So here value is an array of several files >        puts dirhsh.inspect So now we want value.each {|filename| if File.size(filename) > FSIZE # .... martin