cosfreelance
MIS
Hi
I was wondering if anyone can point out the reason i am getting "800A003E / Input past end of file errors". I am unable to figure out why I get this error.
Thanks
fspec="C:\input.txt"
fspec1="C:\output.txt"
LineToSkip = 10
Set fso=createobject("scripting.filesystemobject")
Set ots=fspenTextfile(fspec,1)
X = ""
do While Not ots.AtEndOfStream
For count = 1 To LineToSkip Step 1
ots.SkipLine
Next
tmpstr = ots.ReadLine & vbNewLine
X = X & tmpstr
Loop
ots.close
Set ots=Nothing
Set fso=Nothing
WScript.Echo tmpstr
Set fso=createobject("scripting.filesystemobject")
Set ots=fso.Createtextfile(fspec1,2,true)
ots.Write(X)
ots.close
Set ots=Nothing
Set fso=Nothing
I was wondering if anyone can point out the reason i am getting "800A003E / Input past end of file errors". I am unable to figure out why I get this error.
Thanks
fspec="C:\input.txt"
fspec1="C:\output.txt"
LineToSkip = 10
Set fso=createobject("scripting.filesystemobject")
Set ots=fspenTextfile(fspec,1)
X = ""
do While Not ots.AtEndOfStream
For count = 1 To LineToSkip Step 1
ots.SkipLine
Next
tmpstr = ots.ReadLine & vbNewLine
X = X & tmpstr
Loop
ots.close
Set ots=Nothing
Set fso=Nothing
WScript.Echo tmpstr
Set fso=createobject("scripting.filesystemobject")
Set ots=fso.Createtextfile(fspec1,2,true)
ots.Write(X)
ots.close
Set ots=Nothing
Set fso=Nothing