Zomp Posted April 1, 2008 Posted April 1, 2008 Sorry if this topic has already been discussed, I have not found aanything. Which is the maximum length for $file in the following instruction? $file = FileOpen("test.txt", 0) What about if test.txt size is 1Gb or more?
monoceres Posted April 1, 2008 Posted April 1, 2008 (edited) That probably wouldn't work. The maximum teoretical string length autoit can handle is 2 GB but you won't come near that value. It was under discussion some while ago and most people found that they could use up to somewhere between 400-700 MB But even if you could, you should NEVER read a file that big into memory. I think you should buffer maybe 4-8 mb at a time for good speed Edited April 1, 2008 by monoceres Broken link? PM me and I'll send you the file!
weaponx Posted April 1, 2008 Posted April 1, 2008 That discussion was here:http://www.autoitscript.com/forum/index.ph...amp;hl=megabyte
PsaltyDS Posted April 1, 2008 Posted April 1, 2008 (edited) Sorry if this topic has already been discussed, I have not found aanything. Which is the maximum length for $file in the following instruction? $file = FileOpen("test.txt", 0)32 bits. That's just the file handle. What about if test.txt size is 1Gb or more?Assuming you mean to read the entire file into a string, I would review this topic first: A set of question for file Executive summary: Although the theoretical limit for an AutoIt string is 2GB, there are practical limitations in the Win32 environment that make actual string manipulation fail somewhere between 100MB and around 210MB, depending on your resources (primarily RAM). In a 64-bit Windows environment, you may be able to go much larger, but I haven't had a chance to test that yet. Edit: Doh! Beaten to it by weaponx! Edited April 1, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now