title: How to Rerun the TextStream.AtEndOfStream
body: <p>I'm successfully running the code below to display a text file to the browser, line by line:</p>
  
  <pre><code>&lt;% 
      Filename = "/pages/test.txt"
      Set FSO = server.createObject("Scripting.FileSystemObject")
      Filepath = Server.MapPath(Filename)
  
      Set file = FSO.GetFile(Filepath)
      Set TextStream = file.OpenAsTextStream(1, -2)  
  
      Do While Not TextStream.AtEndOfStream  
              Line = TextStream.readline
              Response.Write Line &amp; "&lt;br&gt;"
      Loop 
  
      Set TextStream = nothing
      Set FSO = nothing
  %&gt;
  </code></pre>
  
  <p>I'd like to run the <code>Do While Not TextStream.AtEndOfStream</code> loop one more time, right before the <code>Set TextStream = nothing</code> statement.</p>
  
  <p>Turns out I cannot "just" copy the <code>Do While</code> loop and place it below the first instance.  There are no results from the <code>TextStream</code> anymore.  </p>
  
  <p>Is there a way to reset the <code>TextStream</code> object back to the beginning of the stream?</p>
  
  <p>I could store the lines in an array and utilize that, but I wanted to see if there was an easier route.</p>