View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Jan 25, 2008 4:48 am Post subject: large files |
|
|
For many years I have been successfully using file@ to get information on files in directories and trees. With file sizes now able to exceed 2^31 bytes, is there a way of retrieving the size of large files, ie, is there a version of files@ (say files_8@) where file_size is returned as integer*8, or perhaps real*8.
regards John
ps : still no one able to comment on large memory problems !! |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Fri Jan 25, 2008 9:01 am Post subject: |
|
|
John,
I hit this problem a while back. I just wrote a routine that uses CISSUE to launch a dos dir command with output to a temporary file, I then open and read this temp file to get the size of the file in question and delete the temporary file when done.
call cissue('DIR "'//FILE(1:L)//'" > temp.txt',ERROR_CODE)
cheers
John |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Jan 25, 2008 11:48 am Post subject: |
|
|
John,
Thanks for the idea.
Unfortunately, I have a tree size program, which I run on my C: drive and also on network drives, with 100,000's of files.
Today, I was trying to search for large files on a network drive and realised that any large files would be overlooked by my scanning program.
It would be good if there was a winapi routine that files@ is based on or similar that copes with file sizes > 2^31 bytes.
regards John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Jan 25, 2008 1:21 pm Post subject: |
|
|
files@ is based on FindFirstFile and FindNextFile.
These api functions give you the high DWORD and the low DWORD of the size but only the the low DWORD is passed on to files@ (and this value appears to be incorrect when the high DWORD is non-zero).
I will aim to provide an alternative to files@ that can be used with very large files. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Feb 01, 2008 10:39 am Post subject: |
|
|
I have added FILES8@ etc for the next release.
In the new routines the size is declared as REAL*8.
These are documented as notes in the original documentation under FILES@ etc. |
|
Back to top |
|
|
|