New topic in General: 

Opening very large 250mb+ txt files and reading line by line

XpatTech - Mon Mar 31, 2008 6:16 am

<http://forums.realsoftware.com/viewtopic.php?t=21547>
                                                                                
                                                                                
Pretty new to RB so this may not be possible.

What I need to do is scan through some very large text files (250mb-2gb) and 
check for certain strings.

I can load and make an exact copy using the following code.

Code:dim f as FolderItem
dim t as TextInputStream
dim o as TextOutputStream
dim s as string

f= GetFolderItem("input.txt")
t= f.OpenAsTextFile
s= t.ReadAll
f= GetFolderItem("output.txt")
o= f.CreateTextFile
o.write(s)


What I need to now is how to scan through line by line ?

Is it best done from HD or memory (Dont forget how big they may be) ?           
                        
                                                                                
                                                                                
                                                                                
                                                                                
                                        




-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to