Page 1 of 1 1
Topic Options
#204979 - 2012-04-26 02:46 PM FileSize more than 2gb?
KonJan Offline
Just in Town

Registered: 2012-04-24
Posts: 2
Loc: Germany
Hello @ all,

i've a problem. In my company we are using the command "getfilesize". But the sizes of the files are bigger than 2gb.
Now the question:
How can we solve this problem?

Please help me as fast as you can.

Thank you all.

Yours faithfully
Jan Konrad

Top
#204981 - 2012-04-26 03:01 PM Re: FileSize more than 2gb? [Re: KonJan]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4548
Loc: USA
It's possible the File System Object does not have this limit. You can try this and see if it works...

? filesize("Path\Filename.ext")

 Code:
function FileSize($file)
  if exist($file)
    $FileSize=CreateObject("Scripting.FileSystemObject").GetFile($File).size
  else
    exit 2
  endif
endfunction

Top
#204983 - 2012-04-26 03:55 PM Re: FileSize more than 2gb? [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4548
Loc: USA
I just created a 3gb file and the FSO code above works... but inbuilt kix getfilesize does not. \:\( It returns -1294967296 type value.

I wonder if there was some limit Ruud ran into years ago, that is now no longer a barrier?

Top
#204984 - 2012-04-26 04:02 PM Re: FileSize more than 2gb? [Re: Allen]
KonJan Offline
Just in Town

Registered: 2012-04-24
Posts: 2
Loc: Germany
woooh :))
thank you

the first try works \:\)

Top
#204985 - 2012-04-26 04:05 PM Re: FileSize more than 2gb? [Re: KonJan]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Allen, yep.
Ruud desided to use whatever was available back then.
might be some API call returned integer and he went with that.
if he updated it to return something else instead, it would work just fine.

one of those suggestions that should have been made when DVD's came about.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 331 anonymous users online.
Newest Members
MaikSimon, kvn317, kixtarts2025, SERoyalty, mytar
17872 Registered Users

Generated in 0.118 seconds in which 0.091 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org