Hello all, first this is an awesome forum.
I am trying to read a file and take the first 10 letters from the left and the last 7 from the right...put them together in a new file.
I have butchered some code I found on the internet and this is what I have so far but when I run it I get...
Error: "Input past end of file"
Code: 800A00E3
System: Space to store the file waiting to be printed is not available on server.
Here is the code:
Dim i
Dim filesys, text, readfile, contents
set filesys = CreateObject("Scripting.FileSystemObject")
set readfile = filesys.OpenTextFile("c:\logs\WORKFILEA.txt", 1, false)
do
contents = left((readfile.ReadLine), 10) & " ---> " & Right((readfile.ReadLine), 7)
WScript.Echo "The line contains the following text - '" & contents & "'."
i = contents
Loop While i <>
I am trying to read a file and take the first 10 letters from the left and the last 7 from the right...put them together in a new file.
I have butchered some code I found on the internet and this is what I have so far but when I run it I get...
Error: "Input past end of file"
Code: 800A00E3
System: Space to store the file waiting to be printed is not available on server.
Here is the code:
Dim i
Dim filesys, text, readfile, contents
set filesys = CreateObject("Scripting.FileSystemObject")
set readfile = filesys.OpenTextFile("c:\logs\WORKFILEA.txt", 1, false)
do
contents = left((readfile.ReadLine), 10) & " ---> " & Right((readfile.ReadLine), 7)
WScript.Echo "The line contains the following text - '" & contents & "'."
i = contents
Loop While i <>