|
-
Sep 7th, 2000, 03:16 AM
#1
Thread Starter
Frenzied Member
I'm trying to copy this file , line by line, and assign it to a string array, but there seem to be no carriage returns in the text, so VB only inputs the first line. The file is system.1st on C:\. I know everybody has this file, so could somebody look at this?
intCount = 0
Open "C:\system.1st" For Input As #1
Do Until EOF(1) = True
intCount = intCount + 1
Line Input #1, strData(intCount)
Loop
intNumLines = intCount
Print intNumLines
Print Len(strData(1))
intNumLines prints as 1
Len for this line prints (in my case) 142, which is the number of characters in the first line. Anybody know why or, better yet, how to get everybit of this code into my string array?
thanks
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Sep 7th, 2000, 03:27 AM
#2
Lively Member
you might try this :
Code:
Open FileName For Binary Access Read As #1 'open file text1(0)
indata = Input(LOF(1), 1)
'Debug.Print Len(code)
Close #1
-
Sep 7th, 2000, 03:44 AM
#3
Thread Starter
Frenzied Member
Kersey,
that was it.
and i do appreciate it.
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|