Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getfile and file length
#1
Dear Gintaras,

I wonder whether there exists un upper limit on the size (bytes) that a string may accomodate via a str.getfile statement. I envisage problems in getting the file content if its length is more than about 4 Mb. Could you please advise and/or suggest an elegant - as always - way to overcome this problem. Many thanks, Best Regards.
#2
Depends on how much memory can be allocated. On my PC can allocate more than 1 GB, but on some computers less, I don't know all reasons.
This works on my PC.
Macro Macro2422
Code:
Copy      Help
str s.all(1024*1024*1024 2) ;;1GB
out s.len
Big files should be read in parts, eg in 64KB parts. str.getfile by default reads whole file. It also can read part of file. Or use CreateFile/ReadFile instead. Or use database.


Forum Jump:


Users browsing this thread: 1 Guest(s)