Results 1 to 3 of 3

Thread: open file and appending from end of file in API

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2000
    Posts
    42
    hi.

    how can i open file in api(this i know..) AND

    start writing text from the END of the file...



  2. #2
    Guest
    Code:
    'Read
    
    Open "C:\TxtFile.txt" For Input As #1 
    Text1.Text = Input$(LOF(1), 1) 
    Close #1
    
    'Save
    
    Open "C:\TxtFile.txt" For Output As #1
    Print #1, "Your text here"
    Close #1
    
    If you want to save the files and keep everything rather than overwriting it.
    Which I believe is what you want to do:
    
    Open "C:\TxtFile.txt" For Append As #1
    Print #1, "Your text here"
    Close #1

  3. #3
    Guest
    That's not an API method though. If you want to stick to pure API, use WriteFile.

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