I can't read correct filesize of an 12 GByte file.

  • Thread starter Ã…ke Johansson
  • Start date
Ã

Ã…ke Johansson

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
 
D

Daniel Berger

Ã…ke Johansson said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,209
Messages
2,571,088
Members
47,686
Latest member
scamivo

Latest Threads

Top