Firstly, I want to insert characters into a text file. I want to print the characters (DAD1) into the middle of the text file (HERE with DA D1) and the
Unless you're working on a file larger than 1/2 of your RAM, you will need to load the text file into RAM, detect it's length there, modify it, then write it back to disk. If the file is large then you would need to make a file stream driver, but unless you're trying to prevent SSD trashing then your best bet is the Read-Modify-Write method.