On Fri, Apr 3, 2009 at 4:17 AM, Derek Smith <derekbellnersmith / yahoo.com> w=
rote:
>
> 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 =A0 =A0=3D Hash.new 0
> dirhsh["vrdevlogs"] =A0 =3D Dir.glob("*.{log,out}")
> dirhsh["vrdevgzlogs"] =3D Dir.glob("*.{log,out}.gz")

Note that Dir.glob returns an array, since there could be several matching =
files

> if ( dirhsh.length > 0 )
> =A0 =A0puts "yes"
> =A0 =A0dirhsh.each_value { |value|

So here value is an array of several files

> =A0 =A0 =A0 =A0puts dirhsh.inspect

So now we want

value.each {|filename|
  if File.size(filename) > FSIZE
  # ....


martin