Results 1 to 5 of 5

Thread: Text file to listview, with premature EOF...

Threaded View

  1. #1

    Thread Starter
    Lively Member THCfog's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    86

    Text file to listview, with premature EOF...

    I have a decent sized list of lines which i load to a listview using a traditional list opening code (below). All works well, but encountering certian strings which are apparently EOF markers cut things off early leaving my list half empty.

    VB Code:
    1. Open "C:\FileCodeList.txt" For Input As #1
    2.     Do While Not EOF(1)
    3.     Line Input #1, str1
    4.     If Left(str1,7)="KeepC:\" Then ListView1.ListItems.Add , , str1
    5.     Loop
    6.     Close #1

    Ive read many articles on open as binary, but i cannot get any sort of list population going with that. Plus, i cannot store the entire file as a array due to its large size. From 1 to 150 MB.

    Im not sure if i should somehow process the file before loading, removing or replacing all Null characters or EOF marking characters ( im not sure what they are) , or if there is a binary loop i can use to load this list successfully.

    Amy help would be much appreciated. Thanks ahead of time.
    Last edited by THCfog; Jun 29th, 2005 at 08:25 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width