Textstream
I have an asp page which opens a large (190 lines) text file. I hold the text file open and retrieve the lines, one at a time until there is no more lines to retrieve. The trouble is that I keep getting the error message
Microsoft VBScript runtime (0x800A003E)
Input past end of file
I understand that there is more lines in my code than there is in the textstream, but I have tried to use several functions to stop the code from reading further. Including do while f.AtEndofStream = false and while not f.AtEndofStream = true. I have also tried to count the lines in the file before reading each line. Nothing has solved this error.
I understand that in some text files the AtEndofStream can be influenced by CRLF's after the data, but can anyone shed some light on this?
View Replies
I have so far been unable to get the TextStream Object to write on Fat32.
I'm using Windows 2000 Pro Sp4. Scripts have write access and I even tried
giving IUSR user level writes and still when I tried loading the ASP page it
just hangs trying to create the file :(.
<%
Function WriteText(sPath, sText)
Dim fso, TextFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set TextFile = fso.CreateTextFile(sPath, True)
TextFile.Write sText
TextFile.Close
End Function
WriteText "Test.htm", "Testing, Testing, 1, 2, 3"
%>
View Replies
View Related
What I'm trying to do is take a really long text file and just pull out key lines in the file based on the first word on the line to create a new text file with just the lines I select for written.
I'm comfortable with the opening and creating textfile part, but how would I scan through the source file and only readline when I hit line that starts with a keyword, then append that to the new file and keep going until the next keyword or file end? That's what I can't figure out.
View Replies
View Related
how can I go back to the first line of my file, once that I've used the ReadAll propriety?
View Replies
View Related
In Windows 2000 I need permissions set so that I can write a text file to the folder when the asp page is loaded. Right now I have only these permissions set:
Administrator: Full
System: Full
Everyone: Read and Execute, List, Read
Network: Read and Execute. List. Read
Is there some other "user" that I can give permissions to to write a text file to the folder that doesn't allow write permissions to IUSER_MachineName?
View Replies
View Related