reading txt files

Results 1 to 2 of 2

Thread: reading txt files

  1. #1
    Join Date
    Dec 1969
    Posts
    30

    Default reading txt files

    I have an ASP script that reads .txt files from the drive. It works well for other files. But when I try to read an empty file, it gives an error like:<BR><BR>Microsoft VBScript runtime error &#039 800a003e&#039 <BR>Input past end of file <BR><BR>I am using the following to open the file for reading.<BR><BR>Set FSOStream1 = FSObject.OpenAsTextStream(ForReading, TristateUseDefault)<BR><BR>I think opening the file for &#039reading&#039 mode gives this error. Is there any alternative to this? Please help. <BR>All suggestions are welcome.<BR><BR>Thanks,<BR>Shashin

  2. #2
    Chris Willey Guest

    Default RE: reading txt files

    Try this:<BR><BR>&#060;%<BR>Dim myFS, myFile<BR>Set myFS = CreateObject("Scripting.FileSystemObject")<BR>Set myFile = myFS.OpenTextFile("c:filename.txt", 1)<BR>&#037;&#062;<BR><BR>It may not make a difference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •