From: Daniel Berger Date: 2006-11-03T01:05:13+09:00 Subject: Re: file size revisit Park Heesob wrote: > As the another workaround in windows, try this: > > require 'Win32API' > def File.size(name) > buf = "\0"*36 > Win32API.new('kernel32','GetFileAttributesEx','PLP','L').call(name,0,buf) > (buf[28,4].unpack("L").first << 32) + buf[32,4].unpack("L").first > end I don't think the problem is File.size. I suspect it's the "if File.file?(path)" line failing somewhere it shouldn't, but the OP isn't clear. Regards, Dan