Using 6.2, it is not possible to write back to the text files. We consider Text files are read-only resources. There is some what similar feature coming in 7.2 version
that does some what what you are looking for. Still it is not update but you can write back a whole file. If you use 7.0 version, you should be able to write a XML version of the file instead of CSV file using the suggestion in the comment of the above JIRA. Look in the Reference Guide for how you can use those XML functions.