This is probably obvious, alas, I don't know how to do it. I want to change a file. Actually I want to process it's contents, write the result to a temp file, exchange the contents of original and temp file, and then delete the temp file. Michael