Results 1 to 9 of 9

Thread: How to over write a text file(Not add to end of text file)?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    How to over write a text file(Not add to end of text file)?

    Hi all. I am using the following lines to write to a text file. The current code keeps adding data to the end of text file!! But i want this code to over right the text file(Not add data to end of the text file) with fresh data and if the text file didn't exist create one.

    3 Code:
    1. Open "C:\data.txt" For Append As #1
    2.        Print #1, strUser; " ID:"; strId
    3.        Close #1
    Last edited by tony007; Jan 15th, 2009 at 02:49 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width