Silverfrost Forums

Welcome to our forums

large files

25 Jan 2008 3:48 #2697

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 integer8, or perhaps real8.

regards John

ps : still no one able to comment on large memory problems !!

25 Jan 2008 8:01 #2700

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

25 Jan 2008 10:48 #2702

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

25 Jan 2008 12:21 #2703

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.

1 Feb 2008 9:39 #2724

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.

Please login to reply.