Options

Get file size for files > 2GB

svensk.tigersvensk.tiger Member Posts: 31
Hi folks,

my envirionment: Nav 2009 R2 Classic client, no RTC

my challenge: import xml files > 2 GB in size ( using INSTREAM)

my problem: the file.LEN reports the wrong file size, instead of 2.478.870.528 Bytes I got -1.7....... somewhat. (Minus!!!)

Regardles of the field type: Integer, BigInteger, Decimal.

Even if I use automation Shell32 ... item.size, it's always the same.

Looks like there is a limitation in the interface to the max. values of an integer.


Is there any other way, to get the file size?

Aside from "run.command 'dir filename > tempfile.txt"
and reading the tempfile.
Svensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)

Comments

  • Options
    eyolfthoeyolftho Member Posts: 18
    Since the client is a 32-bit program, it cannot handle integers larger than 2147483647...and the LEN propery of FILE is an integer, not biginteger.
    Any value larger than this will yield a 50% probability of the leftmost bit being "1"....which indicates a negative value.
    I don't think that you wil be able to work around this in NAV....have you tried to use FileSystemObject automation objects?
  • Options
    svensk.tigersvensk.tiger Member Posts: 31
    yes, it hit me yesterday night,

    even if I have the correct file size, INSTREAM stops right at the beginning with a EndOfStream.

    no chance, to do this in NAV, because the "TEXT"-file has recordsizes larger than 8 KB.

    So I have to Split the file outside NAV
    Svensk.Tiger (Henning Möller)
    PASS Multibank Solutions AG
    (Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)
Sign In or Register to comment.