Is there a limitation to the file size returned by DIR() ? (AREV Specific)
At 03 JAN 2002 02:06:26PM Michael Gwinnell wrote:
Running Win98 client, Novell server, NLM, etc…
Have a file that is well over 2GB in size.
The file size field returned by the DIR() command in R/Basic returns a file size of 1.6GB.
Have many files that end up with this same problem (over 2GB, file sizes returned range from 1 to 1.6GB)
Is this a known limitation, a bug, or simply a 'too bad its a dos program' problem? Is there a quick-fix or workaround?
Thanks!
At 03 JAN 2002 06:52PM Victor Engel wrote:
You can parse the output to the DOS DIR command. Unfortunately, the output of DOS DIR command is inconsistent between DOS versions. The problem is that the DIR() function is limited by its 32 bit resolution to 2147483647.
At 08 JAN 2002 02:43AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Michael,
The limitation is an artefact of the FAT filing system and its support of file control blocks (which impose a limit on directory file sizes) and also of the DOS file pointer (ie. the pointer update uses DOS interrupt 21h - this determines the size of a closed file).
So how do you manage to write files bigger than 2GB? Windows lets you do it from its API, as do network products like Novell Netware.
Try piping the output of a DOS "dir" command to a temporary file and then parsing it.
World Leaders in all things RevSoft