i need to write a script to modify a fairly large file only in certain places using the file system object model. i was thinking something like this:
'read entire file into array
set fil1 = fso.getfile(file)
set ts = fil1.openastextstream(forreading)
do until ts.atendofstream = true
n = n + 1
indata(n) = ts.readline
loop
NumberOfLines = n
ts.close
'output file line by line, making changes as needed
set fil1 = fso.getfile(file)
set ts = fil1.openastextstream(forwriting)
for n = 1 to NumberOfLines
'script that determines if im at a point where a change is to be made
ts.writeline indata(n)
next n
ts.close
someone please tell me there is an easier way to do this. im kindof new to visual basic. thanks!