how to replace a file

i wrote a file and waant to replace it with the old