I am trying this program but I get the wrong file size?
sf = File.size('D:\DVD_CAPTURE\uvs040114-003.MPG')
puts sf
The file I try to read the size of = 12 152 090 kB is uvs040114-003.MPG
This simple test program prints -441161728 is there a bug?
It should print 12 152 090 000 bytes.
Have I missed something??
Best regards
Åke Johansson
···
--
Posted via http://www.ruby-forum.com/.
Åke Johansson wrote:
I am trying this program but I get the wrong file size?
sf = File.size('D:\DVD_CAPTURE\uvs040114-003.MPG')
puts sf
The file I try to read the size of = 12 152 090 kB is uvs040114-003.MPG
This simple test program prints -441161728 is there a bug?
It should print 12 152 090 000 bytes.
Have I missed something??
Best regards
Åke Johansson
require 'win32/file'
It should work after you do that. Do gem install win32-file if you don't have win32-file (it's included with the latest one-click installer, though).
Regards,
Dan