Max file size using Open 
Author Message
 Max file size using Open

Is there a limit to the size of file that can be handled using the Opens
statement. Using the following code I cannot read to the end of the file:

Open "c:\sm6.pdf" For Input As #1

While Not EOF(1)
    Line Input #1, myvar
    If Instr(myvar, str) > 0 Then
        Debug.Print myvar
    End If
Wend

Close

Basically, I need to search for strings in large files.

TIA

--
Angus Graham
Galloway Herb Nursery



Sat, 05 Jul 2003 23:47:56 GMT  
 Max file size using Open
use a "binary" filetype and then read chunks of it into a string variable to
search.

you deal with chunk boundaries as necessary

this avoids piecemeal line by line input delays and you can handle cr/lf
problems in code

pdf files are a mix of binary graphics and text pieces, so you do have some
"filtering" to prepare for.

--
best regards,
hapticz
|Is there a limit to the size of file that can be handled using the Opens
|statement. Using the following code I cannot read to the end of the file:
|
|Open "c:\sm6.pdf" For Input As #1
|
|While Not EOF(1)
|    Line Input #1, myvar
|    If Instr(myvar, str) > 0 Then
|        Debug.Print myvar
|    End If
|Wend
|
|Close
|
|Basically, I need to search for strings in large files.
|
|TIA
|
|--
|Angus Graham
|Galloway Herb Nursery
|
|



Sun, 06 Jul 2003 14:16:44 GMT  
 Max file size using Open
In VB5 the Max file size is 2Gb

However as others have poinetd out reading files in chunks is more
sensible - if they are pretty large.

On Tue, 16 Jan 2001 15:47:56 -0000, "Angus Graham"

Quote:

>Is there a limit to the size of file that can be handled using the Opens
>statement. Using the following code I cannot read to the end of the file:

>Open "c:\sm6.pdf" For Input As #1

>While Not EOF(1)
>    Line Input #1, myvar
>    If Instr(myvar, str) > 0 Then
>        Debug.Print myvar
>    End If
>Wend

>Close

>Basically, I need to search for strings in large files.

>TIA

>--
>Angus Graham
>Galloway Herb Nursery



Sun, 06 Jul 2003 20:54:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help:Howto run a progress bar using the size of a file as progressbar.max

2. Make Crystal open in Max Window size

3. Make Crystal open in Max Window size

4. Max size for .adp files??

5. Max. Size when reading a text data file

6. What's the max size of BMP file VB 4.0 can handle

7. Using VBA Automation to Open Word at the File Open Locatiion

8. Max database size in Access 97

9. Max Size of store and entry id

10. Address To Max size

11. Max Module Size

12. PictureBox Max Size?

 

 
Powered by phpBB® Forum Software