Writing to text files

Results 1 to 2 of 2

Thread: Writing to text files

  1. #1
    Join Date
    Dec 1969

    Default Writing to text files

    I am extracting informtion from a form and appending it to a text file. Is there any way to append the information to the beginning of the file instead of the end?<BR><BR>Thanks<BR><BR>PS: I am only writting 1 line at a time

  2. #2
    Join Date
    Dec 1969

    Default No...

    ...when you open a file for appending, the pointer is automatically placed at the end of the file.<BR><BR>The best thing is to open the file once for reading. Load in the text. Then pre-append your text. Then open the file again for writing and write your new contents in.<BR><BR>If you do some research, there&#039;s an article on www.4guysfromrolla.com on the best (most efficient & fastest) ways to open a text file using ASP.<BR><BR>Craig.

Posting Permissions

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