I was wondering if there was any way to replace part of a text file so that while one part will change, the rest will stay the same. If there is a way, ho would I go about doing it?
thanks a bunch
Printable View
I was wondering if there was any way to replace part of a text file so that while one part will change, the rest will stay the same. If there is a way, ho would I go about doing it?
thanks a bunch
If the file isn't huge, just open it, put it in a variable, change it, then write it over the original. I don't know of any way to edit only part of a text file. Doesn't mean it can't be done, but I have no idea how.
for all but very large files it is easiest for me to Line Input it into a string array - make the desired test change to the array variable(s) and then write it back to the sane filename
It could be done by Imputting the whole file into a simple string variable as well
may be more elborate than you want but you may find some direction and pointers as to what you can accomplish.
http://forums.vb-world.net/showthrea...818#post114818