rename $ftp->rename(file1, file2) Renames a file on the server. Arguments are: file1 The old name of the file. file2 The new name of the file.