Re: "scrrun.dll" not compatible in different languages?



> The other thing that FSO does extremely well is handle Unix style end of
> line markers. The built in VB 6 "line input" statement requires line
> markers to be the DOS standard of CRLF. The FSO readline handles CR, LF,
> and CRLF.

Unless the file is humongous (several tens of megabytes big), this method using standard VB statements will work fine also...

Dim FileNum As Long
Dim TotalFile As String
Dim IndividualLines() As String
FileNum = FreeFile
Open "c:\SomeDircectory\YourFile.txt" For Binary As #FileNum
TotalFile = Space(LOF(FileNum))
Get #FileNum, , TotalFile
Close #FileNum
IndividualLines = Split(TotalFile, vbLf)

where you can now loop through the IndividualLines array in order to perform whatever action you need to on the lines in the file one at a time.

Rick - MVP

.



Relevant Pages

  • Re: "scrrun.dll" not compatible in different languages?
    ... For the clients who use CRLF, ... Dim FileNum As Long ... Dim IndividualLines() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: Fastest way to read characters
    ... A lot more responses here than I expected. ... > grown quite large and I've been using the line input method for many ... Dim FileNum As Long ... Dim IndividualLines() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: Fastest way to read characters
    ... >Dim FileNum As Long ... >Dim TotalFile As String ... >Dim IndividualLines() As String ...
    (microsoft.public.vb.general.discussion)