| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
vbscript read line in the middle
|
Original Message
|
Name: dougchiu
Date: January 9, 2008 at 19:21:29 Pacific
Subject: vbscript read line in the middleOS: Windows2000CPU/Ram: 2Model/Manufacturer: MS |
Comment: Hi I want to have a vbscript to read text file start from the middle of the file. e.g. each time read the file and skip the first 5 lines and start from sixth line until the end of file. how can i do it? Thank you for your help~!
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Razor2.3
Date: January 9, 2008 at 19:31:53 Pacific
|
Reply: (edit)Just add a loop after you open the file and throw away the first five lines.
'Assuming your file stream is called oFileIn... Dim i For i = 1 To 5 oFileIn.ReadLine Next
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Razor2.3
Date: January 9, 2008 at 21:49:21 Pacific
|
Reply: (edit)It reads the next line, then returns a string. Because we're not doing anything with the returned string, we throw away the text.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home