Get file size for files > 2GB

svensk.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.
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.)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)
0
Comments
-
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?0 -
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 NAVSvensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions