On Mar 13, 12:59 ¨Βν¬ ΆΞατιοξ¬ ΓαςεωΆ ΌΓαςεω®Ξατ®®®ΐτυςξες®γονχςοτεΊ > Hi, > > I've written a script to monitor some files stored on our network. ¨Βθε > files range from a few hundred MB to 20-50g. ¨Ββοφε γεςταιποιξ> which I haven't really narrowed down yet, the file sizes start being > reported incorrectly from my script. ¨Βτ§ασ ιζ τθςουτιξτθατ δοεσ > the system query is using a 32 bit thing for the size and it's getting > truncated as integers do. Some files actually come back with a negative > size. ¨Βθε δατα τωπε τθατ ςυβω ισ υσιξισ πεςζεγτμγαπαβμοζ θομδιξ> the size of the files. ¨Β§φτςιεΖιμε®σιϊεΏ αξΖιμεΥτιμσ®σιϊεΏ¬ σο > I'm somewhat at a loss short of writing an extension. Any ideas? > > The script is running on windows, querying the files via UNC paths > through a samba share on linux. It's a bug in Ruby. The win32-file library fixes it. require 'win32/file' # Do this first File.size(some_big_file) Regards, Dan