Trouble reading txt files

Results 1 to 3 of 3

Thread: Trouble reading txt files

  1. #1
    Join Date
    Dec 1969
    Posts
    30

    Default Trouble 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
    ActiveALLI Guest

    Default RE: Trouble reading txt files

    I am not sure but i think if you do<BR>&#060;%<BR>if FSOStream1.EOF Then <BR>Response.Write("This is an emty file, try anotherone")<BR>End if <BR>&#037;&#062;<BR>right after on all openings you do ... .. blahh .. well i am not sure ..

  3. #3
    Patrik Berntsson Guest

    Default RE: Trouble reading txt files

    Can you send me that file who opens TXT-files. I have to open a couple of HTM files so i think i can use your code if i can get it! My email is onsala@swipnet.se

Posting Permissions

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