I have a notepad file saved as TEXT.TXT. My program has opened this file and altered it

I have a notepad file saved as TEXT.TXT. My program has opened this file and altered it. What is the code to save

it back to the same folder as Altered.TXT?