In a program I am writing I need to be able to write to a specific line in a textfile. I don't know of anyway to do this except just rewriting the whole textfile which would be a pain to do. Does anyone know how to do this? To clear up any confusion that may have been caused I'll try to show what needs to be done.

This is the textfile I have

[UTFolder]
I need to write a specific string into here
[Extensions]
ut2=C:\UT2004\Maps

The extension list could go on for a while and would take a lot more coding to rewrite the file.