What is the best method of renaming a text file

code would be great, I am looking for the quickest way possible.

Many thanks
Locutus