Originally Posted by Salem
> how come i dont see a single rename() function in the code?
Because we're not here to spoon feed you the complete answer.
You're expected to take what has been given to you and adapt it to your own circumstances, and do some reading to fill in the blanks.
> Then use the rename() function to rename the old file to the new file.
I told you about the rename function, what more do you want?
Basically, all you had to do is look up the function to work out whether it was
rename("old","new") or rename("new","old").
If that's too much, try something else in life.