rename Renames a file or directory Description boolrename stringoldname stringnewname resourcecontext Attempts to rename oldname to newname. &return.success; Example with <function>rename</function> ]]> Prior to PHP 4.3.3, rename could not rename files across partitions on *nix based systems. As of PHP 5.0.0 rename can also be used with some URL wrappers. Refer to for a listing of which wrappers support rename. The wrapper used in oldname MUST match the wrapper used in newname. ¬e.context-support; See also copy, unlink, and move_uploaded_file.