Not sure what is going on here so maybe one of the more experienced script writers can answer this. I have a job that will either 'Add', 'Modify' or 'Delete' a record in a text file. The records are of variable size and the fields are delimited by commas. I use a condition expression to locate the record I want to modify. After I have located the record, I create a new string to overlay the current string. That is the plan but what is happening is that the changes are being appended to the current record. I was expecting the fwrite to overlay but it isn't. I am opening the file as 'r+t'. I don't do any locking. Any suggestions on what I am doing wrong? Thanks.. :bemused: