Definition and Usage. The rename() function renames a file or directory. This function returns TRUE on success, or FALSE on failure.
www.w3schools.com