Results 1 to 3 of 3

Thread: VB.net Append text in the end of txt file

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2017
    Posts
    199

    VB.net Append text in the end of txt file

    Hello, can someone advice me how i can make correct to add new value string in text file at specific location.
    I will give full example

    So let's start i have a file File1.txt
    Inside i have this information:

    Line1: /grant Username2OI)(CI)F /T
    Line2: /GRANT:Username2,Full /UNLIMITED

    so what i want to do programatically, in Line 1 i want to add after /T new record string
    example result will be:
    Code:
    /grant Username2:(OI)(CI)F /T /grant Username3:(OI)(CI)F /T
    then for line 2 i want to add before the /UNLIMITED new string
    example result will be:
    /GRANT:Username2,Full /GRANT:Username3,Full /UNLIMITED
    how i can make it like that? - Please note Username are just example text it can be other text
    And for example how can i add new line in the end with string after line2, to add new strings each line if i need?
    Last edited by luckydead; Oct 27th, 2022 at 12:11 PM.

Tags for this Thread

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